]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: initialize pointer before calling pcre_study
authorPhilippe Antoine <contact@catenacyber.fr>
Wed, 9 Sep 2020 13:54:36 +0000 (15:54 +0200)
committerPhilippe Antoine <contact@catenacyber.fr>
Fri, 11 Sep 2020 07:48:02 +0000 (09:48 +0200)
So as not to check an uninitialized value
Found by MSAN

src/detect-parse.c

index b7b1e5980fb557c5692d26b43b7517c04e28fbd6..b14a15b2e5ea38a9592387f2295c1721b59b5222 100644 (file)
@@ -2463,7 +2463,7 @@ void DetectParseRegexAddToFreeList(DetectParseRegex *detect_parse)
 
 bool DetectSetupParseRegexesOpts(const char *parse_str, DetectParseRegex *detect_parse, int opts)
 {
-    const char *eb;
+    const char *eb = NULL;
     int eo;
 
     detect_parse->regex = pcre_compile(parse_str, opts, &eb, &eo, NULL);