diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-03-15 16:59:40 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-03-15 16:59:40 +0100 |
commit | b097e889a14de1341262e53c70451f67bbe077ab (patch) | |
tree | 707bbc27bc5a91b42b3fe0db84576183ce16c29a | |
parent | ebda75e574dcb077c0da3ffd8cc4cc6b96c69ed3 (diff) | |
download | rsyslog-b097e889a14de1341262e53c70451f67bbe077ab.tar.gz rsyslog-b097e889a14de1341262e53c70451f67bbe077ab.tar.bz2 rsyslog-b097e889a14de1341262e53c70451f67bbe077ab.zip |
bugfix: segfault in expression optimizer
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=423
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | grammar/rainerscript.c | 8 |
2 files changed, 6 insertions, 4 deletions
@@ -3,6 +3,8 @@ Version 7.3.8 [devel] 2013-03-?? - imrelp: now supports listening to IPv4/v6 only instead of always both build now requires librelp 1.0.2 closes: http://bugzilla.adiscon.com/show_bug.cgi?id=378 +- bugfix: segfault in expression optimizer + closes: http://bugzilla.adiscon.com/show_bug.cgi?id=423 - bugfix: imuxsock was missing SysSock.ParseTrusted module parameter To use that functionality, legacy rsyslog.conf syntax had to be used. Also, the doc was missing information on the "ParseTrusted" set of diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c index 7ef7bf7f..8a9c9aaa 100644 --- a/grammar/rainerscript.c +++ b/grammar/rainerscript.c @@ -2635,7 +2635,7 @@ cnfexprOptimize_CMP_severity_facility(struct cnfexpr *expr) /* optimize a comparison with a variable as left-hand operand * NOTE: Currently support CMP_EQ, CMP_NE only and code NEEDS - * TO BE CHANGED for other comparisons! + * TO BE CHANGED fgr other comparisons! */ static inline struct cnfexpr* cnfexprOptimize_CMP_var(struct cnfexpr *expr) @@ -2790,10 +2790,10 @@ cnfexprOptimize(struct cnfexpr *expr) expr->l = expr->r; expr->r = exprswap; } - } else if(expr->l->nodetype == 'V') { - expr = cnfexprOptimize_CMP_var(expr); } - if(expr->r->nodetype == 'A') { + if(expr->l->nodetype == 'V') { + expr = cnfexprOptimize_CMP_var(expr); + } else if(expr->r->nodetype == 'A') { cnfexprOptimize_CMPEQ_arr((struct cnfarray *)expr->r); } break; |