summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-10-17 16:57:51 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-10-17 16:57:51 +0200
commitc4bb2d1cfa92ea9ee4ece2d6f761be8079610335 (patch)
treeeaf24645a676c53595357d46ccae3e762e2c6048
parentc40898739485e0a407477b41d9eb3f925995ef17 (diff)
parentd3bb17372ef3282f08e7df2d457d70677eda851f (diff)
downloadrsyslog-c4bb2d1cfa92ea9ee4ece2d6f761be8079610335.tar.gz
rsyslog-c4bb2d1cfa92ea9ee4ece2d6f761be8079610335.tar.xz
rsyslog-c4bb2d1cfa92ea9ee4ece2d6f761be8079610335.zip
Merge branch 'beta'
-rw-r--r--ChangeLog9
-rw-r--r--plugins/imklog/bsd.c6
-rw-r--r--plugins/imklog/solaris_cddl.c2
3 files changed, 11 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 8f868156..6d33904e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -25,6 +25,9 @@ Version 7.1.12 [beta] 2012-10-??
both from code & doc and emitted warning message if still used
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=361
Thanks to Michael Biebl for reporting & suggestions
+- bugfix: imklog truncated head of received message
+ This happened only under some circumstances. Thanks to Marius
+ Tomaschwesky and Florian Piekert for their help in solving this issue.
----------------------------------------------------------------------------
Version 7.1.11 [beta] 2012-10-16
- bugfix: imuxsock truncated head of received message
@@ -203,7 +206,7 @@ Version 6.4.3 [V6-STABLE] 2012-??-??
both from code & doc and emitted warning message if still used
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=361
Thanks to Michael Biebl for reporting & suggestions
-- bugfix: imuxsock truncated head of received message
+- bugfix: imuxsock and imklog truncated head of received message
This happened only under some circumstances. Thanks to Marius
Tomaschwesky, Florian Piekert and Milan Bartos for their help in
solving this issue.
@@ -787,8 +790,8 @@ expected that interfaces, even new ones, break during the initial
syslog plain tcp input plugin (NOT supporting TLS!)
[ported from v4]
---------------------------------------------------------------------------
-Version 5.10.1 [V5-STABLE], 2012-0?-??
-- bugfix: imuxsock truncated head of received message
+Version 5.10.1 [V5-STABLE], 2012-10-17
+- bugfix: imuxsock and imklog truncated head of received message
This happened only under some circumstances. Thanks to Marius
Tomaschwesky, Florian Piekert and Milan Bartos for their help in
solving this issue.
diff --git a/plugins/imklog/bsd.c b/plugins/imklog/bsd.c
index 80ff9494..d4f9f773 100644
--- a/plugins/imklog/bsd.c
+++ b/plugins/imklog/bsd.c
@@ -92,7 +92,9 @@ submitSyslog(int pri, uchar *buf)
/* we now try to parse the timestamp. iff it parses, we assume
* it is a timestamp. Otherwise we know for sure it is no ts ;)
*/
- i = 4; /* first digit after '[' */
+ i = 4; /* space or first digit after '[' */
+ while(buf[i] && isspace(buf[i]))
+ ++i; /* skip space */
secs = 0;
while(buf[i] && isdigit(buf[i])) {
secs = secs * 10 + buf[i] - '0';
@@ -118,7 +120,7 @@ submitSyslog(int pri, uchar *buf)
/* we have a timestamp */
DBGPRINTF("kernel timestamp is %ld %ld\n", secs, nsecs);
bufsize= strlen((char*)buf);
- memcpy(buf+3, buf+i, bufsize - i + 1);
+ memmove(buf+3, buf+i, bufsize - i + 1);
clock_gettime(CLOCK_MONOTONIC, &monotonic);
clock_gettime(CLOCK_REALTIME, &realtime);
diff --git a/plugins/imklog/solaris_cddl.c b/plugins/imklog/solaris_cddl.c
index 7e86c68c..cf5467fc 100644
--- a/plugins/imklog/solaris_cddl.c
+++ b/plugins/imklog/solaris_cddl.c
@@ -216,7 +216,7 @@ sun_getkmsg()
*/
remlen = buflen - len;
- (void) memcpy(buf, &buf[len], remlen);
+ (void) memmove(buf, &buf[len], remlen);
dat.maxlen = MAXLINE - remlen;
dat.buf = &buf[remlen];
} else {