diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-12-20 16:39:39 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-12-20 16:39:39 +0100 |
commit | f112b51b8d6c358b87ac608112d393adb047ea0f (patch) | |
tree | d97b7c6f228415eae94ab177565ac12691d7fd27 /plugins/imuxsock/imuxsock.c | |
parent | db137ef8c1b3f8b24ccf9b3b4bfed4fdf493916a (diff) | |
download | rsyslog-f112b51b8d6c358b87ac608112d393adb047ea0f.tar.gz rsyslog-f112b51b8d6c358b87ac608112d393adb047ea0f.tar.xz rsyslog-f112b51b8d6c358b87ac608112d393adb047ea0f.zip |
bugfix: imuxsock did truncate part of received message if it did not contain a proper date.
The truncation occured because we removed that part of the messages
that was expected to be the date.
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=295
Diffstat (limited to 'plugins/imuxsock/imuxsock.c')
-rw-r--r-- | plugins/imuxsock/imuxsock.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c index 2697c48a..feddb20c 100644 --- a/plugins/imuxsock/imuxsock.c +++ b/plugins/imuxsock/imuxsock.c @@ -565,8 +565,11 @@ SubmitMsg(uchar *pRcv, int lenRcv, lstn_t *pLstn, struct ucred *cred) parse++; lenMsg--; /* '>' */ if((pLstn->flags & IGNDATE)) { - parse += 16; /* just skip timestamp */ - lenMsg -= 16; + /* in this case, we still need to find out if we have a valid + * datestamp or not .. and advance the parse pointer accordingly. + */ + struct syslogTime dummy; + datetime.ParseTIMESTAMP3164(&dummy, &parse, &lenMsg); } else { if(datetime.ParseTIMESTAMP3164(&(pMsg->tTIMESTAMP), &parse, &lenMsg) != RS_RET_OK) { DBGPRINTF("we have a problem, invalid timestamp in msg!\n"); |