From: Andreas Herz Date: Sat, 29 Jul 2017 22:14:50 +0000 (+0200) Subject: rule-parser: ignore duplicated msg keyword X-Git-Tag: suricata-4.0.1~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88a3ba52d62020d023a4fe0084d340c20a63b6e1;p=thirdparty%2Fsuricata.git rule-parser: ignore duplicated msg keyword --- diff --git a/src/detect-msg.c b/src/detect-msg.c index 6195f00a47..5d5a9ad503 100644 --- a/src/detect-msg.c +++ b/src/detect-msg.c @@ -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;