rule-parser: detect duplicate sid keyword

pull/2926/head
Andreas Herz 8 years ago committed by Victor Julien
parent 1e97b03fe0
commit 7d037ae266

@ -74,6 +74,14 @@ static int DetectSidSetup (DetectEngineCtx *de_ctx, Signature *s, char *sidstr)
SCLogError(SC_ERR_INVALID_NUMERIC_VALUE, "sid value to high, max %u", UINT_MAX);
goto error;
}
if (id == 0) {
SCLogError(SC_ERR_INVALID_NUMERIC_VALUE, "sid value 0 is invalid");
goto error;
}
if (s->id > 0) {
SCLogError(SC_ERR_INVALID_RULE_ARGUMENT, "duplicated 'sid' keyword detected");
goto error;
}
s->id = (uint32_t)id;

Loading…
Cancel
Save