From dad883406d9babc905c3e980c023482ca63bdff7 Mon Sep 17 00:00:00 2001 From: Shivani Bhardwaj Date: Mon, 3 Nov 2025 15:25:44 +0530 Subject: [PATCH] detect/xbits: use calloc to avoid undefined behavior --- src/detect-xbits.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/detect-xbits.c b/src/detect-xbits.c index e2181637aa..bb88c008ab 100644 --- a/src/detect-xbits.c +++ b/src/detect-xbits.c @@ -374,7 +374,7 @@ static int DetectXbitParse(DetectEngineCtx *de_ctx, } } - cd = SCMalloc(sizeof(DetectXbitsData)); + cd = SCCalloc(1, sizeof(DetectXbitsData)); if (unlikely(cd == NULL)) return -1;