From: Eileen Donlon Date: Tue, 20 Mar 2012 14:59:47 +0000 (-0400) Subject: reject rules with invalid hex digits in content X-Git-Tag: suricata-1.3beta1~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=793478a8324316549f19cbf1b1aa14f014817e20;p=thirdparty%2Fsuricata.git reject rules with invalid hex digits in content --- diff --git a/src/detect-content.c b/src/detect-content.c index 658341d422..e264dcdbf0 100644 --- a/src/detect-content.c +++ b/src/detect-content.c @@ -158,6 +158,11 @@ int DetectContentDataParse(char *keyword, char *contentstr, char** pstr, uint16_ } else if (str[i] == ' ') { // SCLogDebug("space as part of binary string"); } + else if (str[i] != ',') { + SCLogError(SC_ERR_INVALID_SIGNATURE, "Invalid hex code in " + "content - %s, hex %c. Invalidating signature", str, str[i]); + goto error; + } } else if (escape) { if (str[i] == ':' || str[i] == ';' ||