Skip to content

Commit 5e19d37

Browse files
authored
Merge pull request #3061 from owasp-modsecurity/revert-2992-v2/mst/expand_macros_optim
Revert "Avoid some useless code and memory allocation in case no macro is present"
2 parents 35044f1 + aa6aa77 commit 5e19d37

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

apache2/re_actions.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,6 @@ int expand_macros(modsec_rec *msr, msc_string *var, msre_rule *rule, apr_pool_t
273273
next_text_start = p + 1;
274274
}
275275
} else {
276-
if (arr->nelts == 0) return 0; /* no macro */
277276
/* Text part. */
278277
part = (msc_string *)apr_pcalloc(mptmp, sizeof(msc_string));
279278
part->value = apr_pstrdup(mptmp, text_start);

0 commit comments

Comments
 (0)