From aa6aa77ba94695b95019aa2ea48785c53c8faeb5 Mon Sep 17 00:00:00 2001 From: Ervin Hegedus Date: Wed, 7 Feb 2024 23:03:48 +0100 Subject: [PATCH] Revert "Avoid some useless code and memory allocation in case no macro is present" --- apache2/re_actions.c | 1 - 1 file changed, 1 deletion(-) diff --git a/apache2/re_actions.c b/apache2/re_actions.c index 658b42cf..5b6b9dd1 100644 --- a/apache2/re_actions.c +++ b/apache2/re_actions.c @@ -273,7 +273,6 @@ int expand_macros(modsec_rec *msr, msc_string *var, msre_rule *rule, apr_pool_t next_text_start = p + 1; } } else { - if (arr->nelts == 0) return 0; /* no macro */ /* Text part. */ part = (msc_string *)apr_pcalloc(mptmp, sizeof(msc_string)); part->value = apr_pstrdup(mptmp, text_start);