summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-10-18 10:13:35 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2013-10-18 10:13:35 +0200
commiteb95af01e8feb4b3b10e600697b8b8f07a693840 (patch)
tree7de27e1442f40c25ff1be5c245e8361a81c6b6ea
parente443802244207fe746476cbf87e64364b7d408b1 (diff)
parenta781f8b8b0eee6379880822933b9966ffed5492f (diff)
downloadrsyslog-eb95af01e8feb4b3b10e600697b8b8f07a693840.tar.gz
rsyslog-eb95af01e8feb4b3b10e600697b8b8f07a693840.tar.bz2
rsyslog-eb95af01e8feb4b3b10e600697b8b8f07a693840.zip
Merge branch 'v7-stable'
Conflicts: runtime/conf.c
-rw-r--r--ChangeLog7
-rw-r--r--grammar/rainerscript.c6
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index e5cf2778..f99756b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@ Version 7.5.6 [devel] 2013-10-??
- bugfix: potential misadressing on startup if property-filter was used
This could happen if the property name was longer than 127 chars, a case
that would not happen in practice.
+- bugfix: invalid property filter was not properly disabled in ruleset
---------------------------------------------------------------------------
Version 7.5.5 [devel] 2013-10-16
- imfile: permit to monitor an unlimited number of files
@@ -173,6 +174,12 @@ Version 7.4.5 [v7.4-stable] 2013-09-??
- now requires libestr 0.1.8 as early versions had a nasty bug in
string comparisons
- omelasticsearch: add failed.httprequests stats counter
+- bugfix: invalid property filter was not properly disabled in ruleset
+ Note that this bugfix introduces a very slight memory leak, which is
+ cosmetic, as it just holds data until termination that is no longer
+ needed. It is just the part of the config that was invalid. We will
+ "fix" this "issue" in the devel version first, as the fix is a bit
+ too intrusive to do without hard need in the stable version.
- bugfix: segfault if re_extract() function was used and no match found
- bugfix: potential misadressing on startup if property-filter was used
This could happen if the property name was longer than 127 chars, a case
diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c
index 3eac68d8..ff8eba0c 100644
--- a/grammar/rainerscript.c
+++ b/grammar/rainerscript.c
@@ -234,6 +234,7 @@ DecodePropFilter(uchar *pline, struct cnfstmt *stmt)
} else {
parser_errmsg("error: invalid compare operation '%s'",
(char*) rsCStrGetSzStrNoNULL(pCSCompOp));
+ return(RS_RET_ERR);
}
rsCStrDestruct(&pCSCompOp); /* no longer needed */
@@ -2689,14 +2690,15 @@ struct cnfstmt *
cnfstmtNewPROPFILT(char *propfilt, struct cnfstmt *t_then)
{
struct cnfstmt* cnfstmt;
- rsRetVal lRet;
if((cnfstmt = cnfstmtNew(S_PROPFILT)) != NULL) {
cnfstmt->printable = (uchar*)propfilt;
cnfstmt->d.s_propfilt.t_then = t_then;
cnfstmt->d.s_propfilt.propName = NULL;
cnfstmt->d.s_propfilt.regex_cache = NULL;
cnfstmt->d.s_propfilt.pCSCompValue = NULL;
- lRet = DecodePropFilter((uchar*)propfilt, cnfstmt);
+ if(DecodePropFilter((uchar*)propfilt, cnfstmt) != RS_RET_OK) {
+ cnfstmt->nodetype = S_NOP; /* disable action! */
+ }
}
return cnfstmt;
}