From aa8918abd1298d209d164864baf8867b23a3c99d Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 26 Feb 2014 07:14:46 +0100 Subject: [PATCH] fast-pattern: fix error check in keyword setup Check the right variable. Coverity 1038096 --- src/detect-fast-pattern.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;