summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--grammar/rainerscript.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 035b8fc1..dd353683 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
---------------------------------------------------------------------------
Version 7.4.7 [v7.4-stable] 2013-11-??
+- bugfix: segfault on startup when certain script constructs are used
+ e.g. "if not $msg ..."
- bugfix: imuxsock: UseSysTimeStamp config parameter did not work correctly
Thanks to Tomas Heinrich for alerting us and provinding a solution
suggestion.
diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c
index a1de6442..25d9c9a4 100644
--- a/grammar/rainerscript.c
+++ b/grammar/rainerscript.c
@@ -2737,6 +2737,9 @@ cnfexprOptimize_CMP_severity_facility(struct cnfexpr *expr)
{
struct cnffunc *func;
+ if(expr->l->nodetype != 'V')
+ FINALIZE;
+
if(!strcmp("$syslogseverity", ((struct cnfvar*)expr->l)->name)) {
if(expr->r->nodetype == 'N') {
int sev = (int) ((struct cnfnumval*)expr->r)->val;
@@ -2766,6 +2769,7 @@ cnfexprOptimize_CMP_severity_facility(struct cnfexpr *expr)
}
}
}
+finalize_it:
return expr;
}