From d55114e6d7e0ffe36c6da97a23b3c12c6f9465ca Mon Sep 17 00:00:00 2001 From: Sergey Pinaev Date: Mon, 27 Apr 2026 14:12:48 +0300 Subject: [PATCH] detect-engine-analyzer: remove unnecessary check Always make sure, that smd is not NULL, as we dereference it a few lines below and base64_data for instance is forbidden as a fast_pattern Ticket: 8504 --- src/detect-engine-analyzer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/detect-engine-analyzer.c b/src/detect-engine-analyzer.c index 772ff0254e..f58428e3db 100644 --- a/src/detect-engine-analyzer.c +++ b/src/detect-engine-analyzer.c @@ -1490,7 +1490,8 @@ void EngineAnalysisRules2(const DetectEngineCtx *de_ctx, const Signature *s) SCJbSetString(ctx.js, "buffer", name); SigMatchData *smd = pkt_mpm ? pkt_mpm->smd : app_mpm->smd; - if (smd == NULL && mpm_list == DETECT_SM_LIST_PMATCH) { + if (smd == NULL) { + DEBUG_VALIDATE_BUG_ON(mpm_list != DETECT_SM_LIST_PMATCH); smd = s->sm_arrays[mpm_list]; } do {