From 8647d63e90b74933b3b778778940bb4df2fc6710 Mon Sep 17 00:00:00 2001 From: Felipe Zimmerle Date: Mon, 15 Feb 2016 15:47:36 -0300 Subject: [PATCH] Fix m accuracy initialization inside the Rule class --- src/rule.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rule.cc b/src/rule.cc index 4ad68cf2..6483f101 100644 --- a/src/rule.cc +++ b/src/rule.cc @@ -98,6 +98,7 @@ Rule::Rule(Operator *_op, op(_op), rule_id(0), phase(-1), + m_accuracy(0), m_unconditional(false), m_secmarker(false), m_marker(""), @@ -503,7 +504,6 @@ bool Rule::evaluate(Transaction *trasn) { } } } - } else { #ifndef NO_LOGS trasn->debug(4, "Rule returned 0."); @@ -517,7 +517,7 @@ bool Rule::evaluate(Transaction *trasn) { } } - if (!m_log_message.empty() || !m_log_data.empty()) { + if ((!m_log_message.empty() || !m_log_data.empty()) && !ruleMessage->m_match.empty()) { ruleMessage->m_data = m_log_data; trasn->m_rulesMessages.push_back(ruleMessage); }