Fix potential memory corruption in msre_create_var_ex allocating per-request data out of global pool.

This commit is contained in:
brectanus
2007-03-08 16:15:45 +00:00
parent 8898759c47
commit ab55a8716e
4 changed files with 12 additions and 7 deletions

View File

@@ -131,7 +131,7 @@ int DSOLOCAL expand_macros(modsec_rec *msr, msc_string *var, msre_rule *rule, ap
*(msc_string **)apr_array_push(arr) = part;
/* Resolve the macro and add that to the array. */
var_resolved = msre_create_var_ex(msr->modsecurity->msre, var_name, var_value,
var_resolved = msre_create_var_ex(mptmp, msr->modsecurity->msre, var_name, var_value,
msr, &my_error_msg);
if (var_resolved != NULL) {
var_generated = generate_single_var(msr, var_resolved, rule, mptmp);