]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: fix insertion in linked list for fast pattern
authorPhilippe Antoine <contact@catenacyber.fr>
Mon, 20 Apr 2020 11:57:44 +0000 (13:57 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 20 Apr 2020 12:16:12 +0000 (14:16 +0200)
Make sure we do not add the same list_id twice
by checking at least all the lists with the current priority

src/detect-fast-pattern.c

index a43ac67d24d943538c3fff1c90a5a7d4e452b1d1..da34a0653aca7b50849c29f57e28634a584ac23f 100644 (file)
@@ -97,7 +97,11 @@ void SupportFastPatternForSigMatchList(int list_id, int priority)
             return;
         }
 
-        if (priority <= tmp->priority)
+        /* We need a strict check to be sure that the current list
+         * was not already registered
+         * and other lists with the same priority hide it.
+         */
+        if (priority < tmp->priority)
             break;
 
         ip = tmp;