From: Philippe Antoine Date: Fri, 17 May 2019 13:33:53 +0000 (+0200) Subject: signature: fix overflow in parsing X-Git-Tag: suricata-5.0.0-rc1~478 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=037d50ef06239d412d8fd3bfafc93140e1201ad0;p=thirdparty%2Fsuricata.git signature: fix overflow in parsing --- diff --git a/src/detect-parse.c b/src/detect-parse.c index 2f4ea94777..5ef1cb7c49 100644 --- a/src/detect-parse.c +++ b/src/detect-parse.c @@ -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;