From: Victor Julien Date: Sun, 28 Feb 2016 13:29:09 +0000 (+0100) Subject: vlan: fix bad checks in unittests X-Git-Tag: suricata-3.0.1RC1~98 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=573284b5ed1e78d17d183a9d3727c7788cb57dcb;p=thirdparty%2Fsuricata.git vlan: fix bad checks in unittests --- diff --git a/src/decode-vlan.c b/src/decode-vlan.c index 59495594e7..166be0ff0a 100644 --- a/src/decode-vlan.c +++ b/src/decode-vlan.c @@ -240,7 +240,7 @@ static int DecodeVLANtest03 (void) DecodeVLAN(&tv, &dtv, p, raw_vlan, sizeof(raw_vlan), NULL); - if(p->vlanh == NULL) { + if(p->vlanh[0] == NULL) { goto error; } diff --git a/src/stream-tcp.c b/src/stream-tcp.c index 4c0a81d7f2..80d1b8dffd 100644 --- a/src/stream-tcp.c +++ b/src/stream-tcp.c @@ -10253,7 +10253,7 @@ static int StreamTcpTest40(void) DecodeVLAN(&tv, &dtv, p, GET_PKT_DATA(p), GET_PKT_LEN(p), NULL); - if(p->vlanh == NULL) { + if(p->vlanh[0] == NULL) { SCFree(p); return 0; }