]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
fast-pattern: fix error check in keyword setup
authorVictor Julien <victor@inliniac.net>
Wed, 26 Feb 2014 06:14:46 +0000 (07:14 +0100)
committerVictor Julien <victor@inliniac.net>
Wed, 26 Feb 2014 06:14:46 +0000 (07:14 +0100)
Check the right variable. Coverity 1038096

src/detect-fast-pattern.c

index b6ed2677c5a3944121e3408ff935aa645ecee5fe..a71f23bbb42a9d5ac6c4fe6050298c55ec59734b 100644 (file)
@@ -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;