detect: address intermittent UT crash on OpenBSD

Add missing flow memset in test SCSigOrderingTest12 to avoid the crash.

Test SCSigOrderingTest12                                          : Info: unittest-helper: Sid 1 matched 1 times, as expected [UTHCheckPacketMatchResults:util-unittest-helper.c:638]
Info: unittest-helper: Sid 2 matched 1 times, as expected [UTHCheckPacketMatchResults:util-unittest-helper.c:638]
bash: line 144: 88567 Segmentation fault      (core dumped) ./src/suricata -u -l /tmp/

Bug: #8008.
pull/14104/head
Victor Julien 2 weeks ago
parent 66d4595349
commit 232f0572e0

@ -1997,7 +1997,7 @@ static int SCSigOrderingTest12(void)
Packet *p = NULL;
uint8_t buf[] = "test message";
Flow f;
memset(&f, 0, sizeof(f));
FLOW_INITIALIZE(&f);
f.flags |= FLOW_IPV4;
f.alproto = ALPROTO_UNKNOWN;

Loading…
Cancel
Save