Fix crash in msc_rules_add_file() when using disruptive action in child rule inside of chain

This commit is contained in:
Victor Hora
2018-10-17 14:22:44 -04:00
committed by Felipe Zimmerle
parent 466a427ab4
commit 8088d6af71
2 changed files with 4 additions and 2 deletions

View File

@@ -80,13 +80,13 @@ int Driver::addSecRule(Rule *rule) {
if (lastRule && lastRule->m_chained) {
if (lastRule->m_chainedRuleChild == NULL) {
rule->m_phase = lastRule->m_phase;
lastRule->m_chainedRuleChild = rule;
rule->m_chainedRuleParent = lastRule;
if (rule->m_theDisruptiveAction) {
m_parserError << "Disruptive actions can only be specified by";
m_parserError << " chain starter rules.";
return false;
}
lastRule->m_chainedRuleChild = rule;
rule->m_chainedRuleParent = lastRule;
return true;
} else {
Rule *a = lastRule->m_chainedRuleChild;