From 8efb681cdae11f1e2ae0a68c96056a164e204008 Mon Sep 17 00:00:00 2001 From: Jan Maria Matejka Date: Thu, 31 May 2018 11:27:34 +0200 Subject: [PATCH] Filter: Avoid calling interpret() on NULL in IF --- filter/filter.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/filter/filter.c b/filter/filter.c index 47fb81e8..3fa3d34c 100644 --- a/filter/filter.c +++ b/filter/filter.c @@ -900,12 +900,14 @@ interpret(struct f_inst *what) break; case FI_CONDITION: ARG(1, T_BOOL); - if (v1.val.i) { + if (v1.val.i && what->a2.p) { ARG_ANY(2); - } else { - ARG_ANY(3); + break; + } + if ((!v1.val.i) && what->a3.p) { + ARG_ANY(3); + break; } - break; case FI_NOP: debug( "No operation\n" ); break;