From: Eileen Donlon Date: Tue, 6 Mar 2012 00:50:12 +0000 (-0500) Subject: add null checks to fix bugs in StreamTcpTest23 X-Git-Tag: suricata-1.3beta1~124 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aae7ea5e676502500518dc735c77e4e44a62d042;p=thirdparty%2Fsuricata.git add null checks to fix bugs in StreamTcpTest23 --- diff --git a/src/stream-tcp.c b/src/stream-tcp.c index 134ad94773..e8fb9b1c2f 100644 --- a/src/stream-tcp.c +++ b/src/stream-tcp.c @@ -7226,7 +7226,7 @@ static int StreamTcpTest23(void) // goto end; } - if(ssn.client.seg_list_tail->payload_len != 4) { + if(ssn.client.seg_list_tail != NULL && ssn.client.seg_list_tail->payload_len != 4) { printf("failed in segment reassmebling: "); result &= 0; } @@ -7314,7 +7314,7 @@ static int StreamTcpTest24(void) goto end; } - if(ssn.client.seg_list_tail->payload_len != 2) { + if(ssn.client.seg_list_tail != NULL && ssn.client.seg_list_tail->payload_len != 2) { printf("failed in segment reassmebling\n"); result &= 0; }