]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
signature: fix overflow in parsing
authorPhilippe Antoine <contact@catenacyber.fr>
Fri, 17 May 2019 13:33:53 +0000 (15:33 +0200)
committerVictor Julien <victor@inliniac.net>
Sat, 18 May 2019 05:30:12 +0000 (07:30 +0200)
src/detect-parse.c

index 2f4ea94777bfc95f6ca1215e081d66d5bc925cd0..5ef1cb7c49e7244aff3c8ba35ea64fe4205c9f90 100644 (file)
@@ -1032,6 +1032,10 @@ static inline int SigParseList(char **input, char *output,
             }
         }
     }
+    if (i == len) {
+        *input = NULL;
+        return 0;
+    }
     (*input)[i] = '\0';
     strlcpy(output, *input, output_size);
     *input = *input + i + 1;