diff --git a/src/detect-engine-payload.c b/src/detect-engine-payload.c index c4e247e52a..5331aabd20 100644 --- a/src/detect-engine-payload.c +++ b/src/detect-engine-payload.c @@ -214,7 +214,13 @@ static int DoInspectPacketPayload(DetectEngineCtx *de_ctx, goto match; } - BUG_ON(sm->next == NULL); + /* bail out if we have no next match. Technically this is an + * error, as the current cd has the DETECT_CONTENT_RELATIVE_NEXT + * flag set. */ + if (sm->next == NULL) { + SCReturnInt(0); + } + SCLogDebug("content %"PRIu32, cd->id); /* see if the next payload keywords match. If not, we will