Skip to content

Commit 608cd1d

Browse files
author
Marc Stern
committed
Avoid last loop and storing an empty value in case nothing after last %{..} macro
1 parent e9bf697 commit 608cd1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apache2/re_actions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ int expand_macros(modsec_rec *msr, msc_string *var, msre_rule *rule, apr_pool_t
279279
part->value_len = strlen(part->value);
280280
*(msc_string **)apr_array_push(arr) = part;
281281
}
282-
} while (p != NULL);
282+
} while (p != NULL && *next_text_start);
283283

284284
/* If there's more than one member of the array that
285285
* means there was at least one macro present. Combine

0 commit comments

Comments
 (0)