]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect/content: fix wrong value for depth check
authorVictor Julien <vjulien@oisf.net>
Tue, 5 Mar 2024 09:03:15 +0000 (10:03 +0100)
committerVictor Julien <vjulien@oisf.net>
Fri, 28 Jun 2024 05:39:48 +0000 (07:39 +0200)
Limits propegation checked for DETECT_DEPTH as a content flag,
which appears to have worked by chance. After reshuffling the
keyword id's it no longer worked. This patch uses the proper
flag DETECT_CONTENT_DEPTH.

src/detect-content.c

index 2f9884000523f1f619bf1d431ea3fb9bad2a4653..6d3852ecc56f3c4872cd89118a0b55811d893c86 100644 (file)
@@ -556,7 +556,7 @@ static void PropagateLimits(Signature *s, SigMatch *sm_head)
                 SCLogDebug("stored: offset %u depth %u offset_plus_pat %u", offset, depth,
                         offset_plus_pat);
 
-                if ((cd->flags & (DETECT_DEPTH | DETECT_CONTENT_WITHIN)) == 0) {
+                if ((cd->flags & (DETECT_CONTENT_DEPTH | DETECT_CONTENT_WITHIN)) == 0) {
                     if (depth)
                         SCLogDebug("no within, reset depth");
                     depth = 0;