mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Code cosmetics: checks if actionset is not null before use it
This commit is contained in:
@@ -1781,7 +1781,7 @@ static apr_status_t msre_ruleset_process_phase_(msre_ruleset *ruleset, modsec_re
|
||||
}
|
||||
|
||||
if (rc == RULE_NO_MATCH) {
|
||||
if (rule->actionset->is_chained) {
|
||||
if (rule->actionset && rule->actionset->is_chained) {
|
||||
/* If the current rule is part of a chain then
|
||||
* we need to skip over all the rules in the chain.
|
||||
*/
|
||||
@@ -2138,9 +2138,9 @@ static int msre_ruleset_phase_rule_remove_with_exception(msre_ruleset *ruleset,
|
||||
if (remove_rule) {
|
||||
/* Do not increment j. */
|
||||
removed_count++;
|
||||
if (rule->actionset->is_chained) mode = 2; /* Remove rules in this chain. */
|
||||
if (rule->actionset && rule->actionset->is_chained) mode = 2; /* Remove rules in this chain. */
|
||||
} else {
|
||||
if (rule->actionset->is_chained) mode = 1; /* Keep rules in this chain. */
|
||||
if (rule->actionset && rule->actionset->is_chained) mode = 1; /* Keep rules in this chain. */
|
||||
rules[j++] = rules[i];
|
||||
}
|
||||
} else { /* Handling rule that is part of a chain. */
|
||||
|
Reference in New Issue
Block a user