[icinga-checkins] icinga.org: icinga2/master: Make SetExpression check whether the LHS is null

git at icinga.org git at icinga.org
Mon Nov 24 18:26:29 CET 2014


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

Author: Gunnar Beutner <gunnar at beutner.name>
Date:   Mon Nov 24 17:02:22 2014 +0100

Make SetExpression check whether the LHS is null

fixes #7814

---

 lib/config/expression.cpp |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/config/expression.cpp b/lib/config/expression.cpp
index da9e32f..895e000 100644
--- a/lib/config/expression.cpp
+++ b/lib/config/expression.cpp
@@ -280,6 +280,10 @@ Value SetExpression::DoEvaluate(VMFrame& frame, DebugHint *dhint) const
 
 			if (!vexpr) {
 				object = indexExpr->Evaluate(frame, dhint);
+
+				if (!object)
+					BOOST_THROW_EXCEPTION(ConfigError("Left-hand side argument must not be null."));
+
 				continue;
 			}
 



More information about the icinga-checkins mailing list