diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-10-29 09:37:50 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-10-29 09:37:50 +0100 |
commit | ffa4f08b98d6a8b820b082e4504a4ede495675ca (patch) | |
tree | 07c0ae9ed8cae5700d52567f8005947a3fb9eaf0 | |
parent | a5f5648f75d01aaea3ec8c07c55d80ad86579ed2 (diff) | |
parent | f11d853d89716a9bf29afd16841a149516ca2ef3 (diff) | |
download | rsyslog-ffa4f08b98d6a8b820b082e4504a4ede495675ca.tar.gz rsyslog-ffa4f08b98d6a8b820b082e4504a4ede495675ca.tar.bz2 rsyslog-ffa4f08b98d6a8b820b082e4504a4ede495675ca.zip |
Merge branch 'v7-stable'
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | grammar/rainerscript.c | 9 |
2 files changed, 10 insertions, 3 deletions
@@ -205,6 +205,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 diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c index a2bed2bf..a4cf90bd 100644 --- a/grammar/rainerscript.c +++ b/grammar/rainerscript.c @@ -3055,12 +3055,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: |