From 3b8f595203bc688b10ab357bf03009f8cf119de6 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 28 Feb 2025 07:03:40 +0100 Subject: [PATCH] SQUASH WIP fw rules --- src/detect-engine-sigorder.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/detect-engine-sigorder.c b/src/detect-engine-sigorder.c index 2173508b933c..3564e31c9060 100644 --- a/src/detect-engine-sigorder.c +++ b/src/detect-engine-sigorder.c @@ -803,8 +803,10 @@ void SCSigOrderSignatures(DetectEngineCtx *de_ctx) /* despite having Append in the name, the new Sig/Rule funcs actually prepend with some special * logic around bidir sigs. So to respect the firewall rule order, we sort this part of the list * by the add order. */ - SCSigOrderFunc OrderFn = { .SWCompare = SCSigOrderByIIdCompare, .next = NULL }; - fw_sigw_list = SCSigOrder(fw_sigw_list, &OrderFn); + if (fw_sigw_list) { + SCSigOrderFunc OrderFn = { .SWCompare = SCSigOrderByIIdCompare, .next = NULL }; + fw_sigw_list = SCSigOrder(fw_sigw_list, &OrderFn); + } /* Sort the list */ sigw_list = SCSigOrder(sigw_list, de_ctx->sc_sig_order_funcs);