Skip to content

Commit 4629057

Browse files
authored
Merge pull request #3067 from owasp-modsecurity/revert-2953-v2/mst/optim1
Revert "remove useless apr_pstrdup()"
2 parents 5c79cb0 + e04e8c4 commit 4629057

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apache2/re_actions.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@ int expand_macros(modsec_rec *msr, msc_string *var, msre_rule *rule, apr_pool_t
183183
* no macros in the input data.
184184
*/
185185

186-
data = var->value;
186+
data = apr_pstrdup(mptmp, var->value); /* IMP1 Are we modifying data anywhere? */
187187
arr = apr_array_make(mptmp, 16, sizeof(msc_string *));
188-
if (arr == NULL) return -1;
188+
if ((data == NULL)||(arr == NULL)) return -1;
189189

190190
text_start = next_text_start = data;
191191
do {

0 commit comments

Comments
 (0)