From de2f9593128f590d0241428fe9894f6433fd2697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 6 Jul 2013 12:01:46 +0200 Subject: [PATCH] CLI: don't crash if summary in rule file is empty --- cli/cmdlineparser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/cmdlineparser.cpp b/cli/cmdlineparser.cpp index 0e24c139a..ee1dffefe 100644 --- a/cli/cmdlineparser.cpp +++ b/cli/cmdlineparser.cpp @@ -627,7 +627,7 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[]) tinyxml2::XMLElement *summary = message->FirstChildElement("summary"); if (summary) - rule.summary = summary->GetText(); + rule.summary = summary->GetText() ? summary->GetText() : ""; } if (!rule.pattern.empty())