1
From: Rainer Gerhards <rgerhards@adiscon.com>
2
Date: Tue, 20 Dec 2011 15:39:39 +0000 (+0100)
3
Subject: bugfix: imuxsock did truncate part of received message if it did not contain a proper...
4
X-Git-Url: http://git.adiscon.com/?p=rsyslog.git;a=commitdiff_plain;h=f112b51b8d6c358b87ac608112d393adb047ea0f
6
bugfix: imuxsock did truncate part of received message if it did not contain a proper date.
8
The truncation occured because we removed that part of the messages
9
that was expected to be the date.
10
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=295
12
Origin: upstream, http://git.adiscon.com/?p=rsyslog.git;a=commitdiff_plain;h=f112b51b8d6c358b87ac608112d393adb047ea0f
13
Bug: http://bugzilla.adiscon.com/show_bug.cgi?id=295
14
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/rsyslog/+bug/905419
17
diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c
18
index 2697c48..feddb20 100644
19
--- a/plugins/imuxsock/imuxsock.c
20
+++ b/plugins/imuxsock/imuxsock.c
21
@@ -565,8 +565,11 @@ SubmitMsg(uchar *pRcv, int lenRcv, lstn_t *pLstn, struct ucred *cred)
22
parse++; lenMsg--; /* '>' */
24
if((pLstn->flags & IGNDATE)) {
25
- parse += 16; /* just skip timestamp */
27
+ /* in this case, we still need to find out if we have a valid
28
+ * datestamp or not .. and advance the parse pointer accordingly.
30
+ struct syslogTime dummy;
31
+ datetime.ParseTIMESTAMP3164(&dummy, &parse, &lenMsg);
33
if(datetime.ParseTIMESTAMP3164(&(pMsg->tTIMESTAMP), &parse, &lenMsg) != RS_RET_OK) {
34
DBGPRINTF("we have a problem, invalid timestamp in msg!\n");