Avoid using NULL string (match) in Pm::evaluate

Closes #2178.
This commit is contained in:
Andrei Belov 2019-10-03 20:20:27 +03:00 committed by Felipe Zimmerle
parent beedddd6c6
commit 5929277938
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277

View File

@ -103,7 +103,7 @@ bool Pm::evaluate(Transaction *transaction, Rule *rule,
transaction->m_matched.push_back(match_);
}
if (rule && rule->m_containsCaptureAction && transaction && rc) {
if (rule && rule->m_containsCaptureAction && transaction && rc >= 0) {
transaction->m_collections.m_tx_collection->storeOrUpdateFirst("0",
std::string(match));
ms_dbg_a(transaction, 7, "Added pm match TX.0: " + \