]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: address intermittent UT crash on OpenBSD 14104/head
authorVictor Julien <vjulien@oisf.net>
Tue, 21 Oct 2025 05:19:55 +0000 (07:19 +0200)
committerVictor Julien <vjulien@oisf.net>
Tue, 21 Oct 2025 16:08:20 +0000 (16:08 +0000)
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.

src/detect-engine-sigorder.c

index 1e40a38e1ba3d1addab7f14c33b641fed05b0bde..b6a3ba85a55d4504dabac145f544cd5d0189f9f1 100644 (file)
@@ -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;