diff --git a/gtests/net/packetdrill/run_system_call.c b/gtests/net/packetdrill/run_system_call.c index 9b841d1fe7ba7779bd31782ec7d99568422b2c31..5d0f624b1f8030362bd82a09a5584ee414915c2a 100644 --- a/gtests/net/packetdrill/run_system_call.c +++ b/gtests/net/packetdrill/run_system_call.c @@ -6364,6 +6364,10 @@ static int syscall_sctp_recvv(struct state *state, struct syscall_spec *syscall, sizeof(struct sctp_rcvinfo), infolen); goto error_out; } + if (info == NULL) { + asprintf(error, "info is NULL for sctp_rcvinfo."); + goto error_out; + } if (check_sctp_rcvinfo(info_expr->value.sctp_rcvinfo, info, error)) goto error_out; break; @@ -6373,6 +6377,10 @@ static int syscall_sctp_recvv(struct state *state, struct syscall_spec *syscall, sizeof(struct sctp_nxtinfo), infolen); goto error_out; } + if (info == NULL) { + asprintf(error, "info is NULL for sctp_nxtinfo."); + goto error_out; + } if (check_sctp_nxtinfo(info_expr->value.sctp_nxtinfo, info, error)) goto error_out; break; @@ -6382,6 +6390,10 @@ static int syscall_sctp_recvv(struct state *state, struct syscall_spec *syscall, sizeof(struct sctp_recvv_rn), infolen); goto error_out; } + if (info == NULL) { + asprintf(error, "info is NULL for sctp_recvv_rn."); + goto error_out; + } if (check_sctp_recvv_rn(info_expr->value.sctp_recvv_rn, info, error)) goto error_out; break;