mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-16 07:56:12 +03:00
Fixed matched_var bug
This commit is contained in:
parent
3e0acbe16e
commit
de463a85ce
@ -2142,7 +2142,7 @@ static int execute_operator(msre_var *var, msre_rule *rule, modsec_rec *msr,
|
|||||||
*(const msre_rule **)apr_array_push(msr->matched_rules) = rule;
|
*(const msre_rule **)apr_array_push(msr->matched_rules) = rule;
|
||||||
|
|
||||||
/* Save the last matched var data */
|
/* Save the last matched var data */
|
||||||
if(var != NULL && var->value_len > 0) {
|
if(var != NULL && msr != NULL) {
|
||||||
msr->matched_var->name = apr_pstrdup(msr->mp, var->name);
|
msr->matched_var->name = apr_pstrdup(msr->mp, var->name);
|
||||||
msr->matched_var->name_len = strlen(msr->matched_var->name);
|
msr->matched_var->name_len = strlen(msr->matched_var->name);
|
||||||
msr->matched_var->value = apr_pmemdup(msr->mp, var->value, var->value_len);
|
msr->matched_var->value = apr_pmemdup(msr->mp, var->value, var->value_len);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user