diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-03-22 15:02:15 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-03-22 15:02:15 +0100 |
commit | 27ab3768e2eaefaed7054144939f0730b3fac84f (patch) | |
tree | 5308b3adcb996bdadb545ec0a53e944a91b96183 /tools/pmrfc5424.c | |
parent | e2f13df22c7599fa1fc7d6b4c20081aac78b355a (diff) | |
download | rsyslog-27ab3768e2eaefaed7054144939f0730b3fac84f.tar.gz rsyslog-27ab3768e2eaefaed7054144939f0730b3fac84f.tar.xz rsyslog-27ab3768e2eaefaed7054144939f0730b3fac84f.zip |
bugfix: RFC5424 parser confused by empty structured data
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=237
Diffstat (limited to 'tools/pmrfc5424.c')
-rw-r--r-- | tools/pmrfc5424.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/pmrfc5424.c b/tools/pmrfc5424.c index 2bd18042..b06f1347 100644 --- a/tools/pmrfc5424.c +++ b/tools/pmrfc5424.c @@ -142,7 +142,7 @@ static int parseRFCStructuredData(uchar **pp2parse, uchar *pResult, int *pLenStr * structured data. There may also be \] inside the structured data, which * do NOT terminate an element. */ - if(lenStr == 0 || *p2parse != '[') + if(lenStr == 0 || (*p2parse != '[' && *p2parse != '-')) return 1; /* this is NOT structured data! */ if(*p2parse == '-') { /* empty structured data? */ @@ -211,7 +211,6 @@ static int parseRFCStructuredData(uchar **pp2parse, uchar *pResult, int *pLenStr * * rger, 2005-11-24 */ -//static int parseRFCSyslogMsg(msg_t *pMsg, int flags) BEGINparse uchar *p2parse; uchar *pBuf = NULL; |