From: Victor Julien Date: Wed, 26 Feb 2014 06:14:46 +0000 (+0100) Subject: fast-pattern: fix error check in keyword setup X-Git-Tag: suricata-2.0rc2~62 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aa8918abd1298d209d164864baf8867b23a3c99d;p=thirdparty%2Fsuricata.git fast-pattern: fix error check in keyword setup Check the right variable. Coverity 1038096 --- diff --git a/src/detect-fast-pattern.c b/src/detect-fast-pattern.c index b6ed2677c5..a71f23bbb4 100644 --- a/src/detect-fast-pattern.c +++ b/src/detect-fast-pattern.c @@ -341,7 +341,7 @@ static int DetectFastPatternSetup(DetectEngineCtx *de_ctx, Signature *s, char *a goto error; } int length = atoi(arg_substr); - if (offset > 65535) { + if (length > 65535) { SCLogError(SC_ERR_INVALID_SIGNATURE, "Fast pattern length exceeds " "limit"); goto error;