]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect-engine: initialize struct fields
authorSascha Steinbiss <satta@debian.org>
Mon, 3 Aug 2020 08:26:04 +0000 (10:26 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 4 Aug 2020 09:23:12 +0000 (11:23 +0200)
src/detect-engine-uint.c

index 7d33bd29cd0a1596826a451a8ed2ba52228fa721..51513d877dc84148a61fa9a89320d808a49815aa 100644 (file)
@@ -77,7 +77,9 @@ int DetectU32Match(const uint32_t parg, const DetectU32Data *du32)
 
 DetectU32Data *DetectU32Parse (const char *u32str)
 {
-    DetectU32Data u32da;
+    /* We initialize these to please static checkers, these values will
+       either be updated or not used later on */
+    DetectU32Data u32da = {0, 0, 0};
     DetectU32Data *u32d = NULL;
     char arg1[16] = "";
     char arg2[16] = "";
@@ -269,7 +271,9 @@ int DetectU8Match(const uint8_t parg, const DetectU8Data *du8)
 
 DetectU8Data *DetectU8Parse (const char *u8str)
 {
-    DetectU8Data u8da;
+    /* We initialize these to please static checkers, these values will
+       either be updated or not used later on */
+    DetectU8Data u8da = {0, 0, 0};
     DetectU8Data *u8d = NULL;
     char arg1[16] = "";
     char arg2[16] = "";