]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: initializes memory in bytemath parsing
authorPhilippe Antoine <contact@catenacyber.fr>
Thu, 28 Jan 2021 16:02:19 +0000 (17:02 +0100)
committerVictor Julien <victor@inliniac.net>
Fri, 12 Feb 2021 13:52:33 +0000 (14:52 +0100)
src/detect-bytemath.c

index 8994c13e92c3f3b173999ac1f6ea6c318bc86cc1..9a7005d81b8d262c45df8622c416df423ba09cbe 100644 (file)
@@ -262,7 +262,7 @@ static DetectByteMathData *DetectByteMathParse(DetectEngineCtx *de_ctx, const ch
 #undef MAX_SUBSTRINGS
 #define MAX_SUBSTRINGS 100
     int ov[MAX_SUBSTRINGS];
-    char tmp_str[128];
+    char tmp_str[128] = "";
 
     ret = DetectParsePcreExec(&parse_regex, arg, 0, 0, ov, MAX_SUBSTRINGS);
     if (ret < MIN_GROUP || ret > MAX_GROUP) {