detect/xbits: use calloc to avoid undefined behavior

pull/14262/head
Shivani Bhardwaj 9 months ago committed by Victor Julien
parent a23add0194
commit dad883406d

@ -374,7 +374,7 @@ static int DetectXbitParse(DetectEngineCtx *de_ctx,
} }
} }
cd = SCMalloc(sizeof(DetectXbitsData)); cd = SCCalloc(1, sizeof(DetectXbitsData));
if (unlikely(cd == NULL)) if (unlikely(cd == NULL))
return -1; return -1;

Loading…
Cancel
Save