]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: fix use of uninit memory in DetectDatarepParse
authorPhilippe Antoine <contact@catenacyber.fr>
Thu, 1 Oct 2020 13:21:47 +0000 (15:21 +0200)
committerJason Ish <jason.ish@oisf.net>
Wed, 7 Oct 2020 15:40:38 +0000 (09:40 -0600)
By initializing to empty string

src/detect-datarep.c

index 72c85b9c3c917bdc833ef2cd726f975b58a7c9f3..171566eded81d653a0e0b1df0ea35203e9e0325f 100644 (file)
@@ -293,7 +293,7 @@ static int DetectDatarepSetup (DetectEngineCtx *de_ctx, Signature *s, const char
     SigMatch *sm = NULL;
     char cmd_str[16] = "", name[64] = "";
     enum DatasetTypes type = DATASET_TYPE_NOTSET;
-    char load[PATH_MAX];
+    char load[PATH_MAX] = "";
     uint16_t value = 0;
     uint64_t memcap = 0;
     uint32_t hashsize = 0;