mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
Fixes for Parfait errors - mostly unhandled NULL pointer dereference and data type mismatch
This commit is contained in:
committed by
Felipe Zimmerle
parent
5f996d45f0
commit
62a6f228f8
@@ -1470,7 +1470,7 @@ static apr_status_t msre_action_setenv_execute(modsec_rec *msr, apr_pool_t *mptm
|
||||
env_name = log_escape_nq_ex(msr->mp, env->value, env->value_len);
|
||||
|
||||
/* Execute the requested action. */
|
||||
if (env_name[0] == '!') {
|
||||
if (env_name != NULL && env_name[0] == '!') {
|
||||
/* Delete */
|
||||
apr_table_unset(msr->r->subprocess_env, env_name + 1);
|
||||
|
||||
@@ -1532,7 +1532,7 @@ apr_status_t msre_action_setvar_execute(modsec_rec *msr, apr_pool_t *mptmp,
|
||||
var_name = log_escape_nq_ex(msr->mp, var->value, var->value_len);
|
||||
|
||||
/* Handle the exclamation mark. */
|
||||
if (var_name[0] == '!') {
|
||||
if (var_name != NULL && var_name[0] == '!') {
|
||||
var_name = var_name + 1;
|
||||
is_negated = 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user