diff --git a/src/detect-flowbits.c b/src/detect-flowbits.c index d5d04d1c25..83863ff7f4 100644 --- a/src/detect-flowbits.c +++ b/src/detect-flowbits.c @@ -258,6 +258,7 @@ int DetectFlowbitSetup (DetectEngineCtx *de_ctx, Signature *s, char *rawstr) case DETECT_FLOWBITS_CMD_ISSET: /* checks, so packet list */ SigMatchAppendPacket(s, sm); + break; case DETECT_FLOWBITS_CMD_SET: case DETECT_FLOWBITS_CMD_UNSET: diff --git a/src/detect-parse.c b/src/detect-parse.c index 9c52c50e37..c65507c6b5 100644 --- a/src/detect-parse.c +++ b/src/detect-parse.c @@ -1439,6 +1439,19 @@ static int SigValidate(Signature *s) { } } +#ifdef DEBUG + int i; + for (i = 0; i < DETECT_SM_LIST_MAX; i++) { + if (s->sm_lists[i] != NULL) { + SigMatch *sm; + for (sm = s->sm_lists[i]; sm != NULL; sm = sm->next) { + BUG_ON(sm == sm->prev); + BUG_ON(sm == sm->next); + } + } + } +#endif + SCReturnInt(1); }