[icinga-checkins] icinga.org: icinga2/master: Fix crash in MacroProcessor::ResolveMacros.

git at icinga.org git at icinga.org
Wed Sep 11 15:00:10 CEST 2013


Module: icinga2
Branch: master
Commit: 4b6d8943fa038a5d88467c05eab94e2396f899b2
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=4b6d8943fa038a5d88467c05eab94e2396f899b2

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Wed Sep 11 14:59:49 2013 +0200

Fix crash in MacroProcessor::ResolveMacros.

---

 lib/icinga/macroprocessor.cpp |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/lib/icinga/macroprocessor.cpp b/lib/icinga/macroprocessor.cpp
index dc7409a..5558c13 100644
--- a/lib/icinga/macroprocessor.cpp
+++ b/lib/icinga/macroprocessor.cpp
@@ -34,6 +34,9 @@ Value MacroProcessor::ResolveMacros(const Value& str, const std::vector<MacroRes
 {
 	Value result;
 
+	if (str.IsEmpty())
+		return Empty;
+
 	if (str.IsScalar()) {
 		result = InternalResolveMacros(str, resolvers, cr, escapeFn, escapeMacros);
 	} else if (str.IsObjectType<Array>()) {





More information about the icinga-checkins mailing list