]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
rule-parser: ignore duplicated msg keyword
authorAndreas Herz <andi@geekosphere.org>
Sat, 29 Jul 2017 22:14:50 +0000 (00:14 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 1 Aug 2017 08:06:39 +0000 (10:06 +0200)
src/detect-msg.c

index 6195f00a478f53ceb7ee2b0f8bddd86839994976..5d5a9ad50376b99cb7eeff640adf8b5ec6e837bc 100644 (file)
@@ -103,6 +103,10 @@ static int DetectMsgSetup (DetectEngineCtx *de_ctx, Signature *s, const char *ms
         }
     }
 
+    if (s->msg != NULL) {
+        SCLogError(SC_ERR_INVALID_RULE_ARGUMENT, "Duplicated 'msg:' keyword detected!");
+        goto error;
+    }
     s->msg = SCStrdup(str);
     if (s->msg == NULL)
         goto error;