From 35743b5a4f0515926b501ab20391df1e46c81440 Mon Sep 17 00:00:00 2001
From: Michael Tuexen <tuexen@fh-muenster.de>
Date: Sun, 8 Oct 2017 14:22:07 +0200
Subject: [PATCH] Fix CID 187666.

---
 gtests/net/packetdrill/run_system_call.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gtests/net/packetdrill/run_system_call.c b/gtests/net/packetdrill/run_system_call.c
index 9b841d1f..5d0f624b 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;
-- 
GitLab