]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect/flowint: use calloc to avoid undefined behavior
authorShivani Bhardwaj <shivani@oisf.net>
Mon, 3 Nov 2025 08:15:09 +0000 (13:45 +0530)
committerVictor Julien <vjulien@oisf.net>
Mon, 3 Nov 2025 18:58:23 +0000 (18:58 +0000)
src/detect-flowint.c

index 10b12b9dd32d169acb421e46392dc34312842c0f..e1be3e3213860b521a00c692deea25718e988fd3 100644 (file)
@@ -291,7 +291,7 @@ static DetectFlowintData *DetectFlowintParse(DetectEngineCtx *de_ctx, const char
         goto error;
     }
 
-    sfd = SCMalloc(sizeof(DetectFlowintData));
+    sfd = SCCalloc(1, sizeof(DetectFlowintData));
     if (unlikely(sfd == NULL))
         goto error;