From 2b187a2721a93a13a89b84f06858c94b4555a31f Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 1 Nov 2010 18:55:52 +0100 Subject: [PATCH] Remove a BUG_ON statement from the payload inspection code. --- src/detect-engine-payload.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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