From 0cd1b170ff91ee5002c9c9ea0b291f9189557bd1 Mon Sep 17 00:00:00 2001 From: Pavel Levshin Date: Tue, 29 Oct 2013 09:34:17 +0100 Subject: bugfix: abort if "if $syslogfacility-text..." was being used --- grammar/rainerscript.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c index 986d2802..b03e7c12 100644 --- a/grammar/rainerscript.c +++ b/grammar/rainerscript.c @@ -2926,12 +2926,15 @@ cnfexprOptimize(struct cnfexpr *expr) expr->r = exprswap; } } - if(expr->l->nodetype == 'V') { - expr = cnfexprOptimize_CMP_var(expr); - } if(expr->r->nodetype == 'A') { cnfexprOptimize_CMPEQ_arr((struct cnfarray *)expr->r); } + /* This should be evaluated last because it may change expr + * to a function. + */ + if(expr->l->nodetype == 'V') { + expr = cnfexprOptimize_CMP_var(expr); + } break; case CMP_LE: case CMP_GE: -- cgit v1.2.3 From f11d853d89716a9bf29afd16841a149516ca2ef3 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 29 Oct 2013 09:37:34 +0100 Subject: doc: update ChangeLog --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ChangeLog b/ChangeLog index b40e3c71..97bebc74 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,6 +20,10 @@ Version 7.4.6 [v7.4-stable] 2013-11-?? Thanks to Pavel Levshin for reporting the problem and its location. - bugfix: memleak in re_extract() function Thanks to Pavel Levshin for reporting this problem. +- bugfix: potential abort in RainerScript optimizer + closes: http://bugzilla.adiscon.com/show_bug.cgi?id=488 + Thanks to Thomas Doll for reporting the problem and Pavel Levshin for + fixing it. - bugfix: memory leak in omhiredis Thanks to Pavel Levshin for the fix - bugfix: segfault if variable was assigned to non-container subtree -- cgit v1.2.3