diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-10-17 16:56:12 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-10-17 16:56:12 +0200 |
commit | a21fe156df563267a177b6fcaccaf90e227874db (patch) | |
tree | cc9dc8cdb9e30b1ab71eb5a3a0e5e71b5823ce8c | |
parent | 75079d9519c78c07004495f71ea347543a01f40e (diff) | |
parent | 0a3c0e2f4e8c98f892aab08c154c7c43a89b4102 (diff) | |
download | rsyslog-a21fe156df563267a177b6fcaccaf90e227874db.tar.gz rsyslog-a21fe156df563267a177b6fcaccaf90e227874db.tar.xz rsyslog-a21fe156df563267a177b6fcaccaf90e227874db.zip |
Merge branch 'v6-stable' into beta
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | plugins/imklog/bsd.c | 6 | ||||
-rw-r--r-- | plugins/imklog/solaris_cddl.c | 2 |
3 files changed, 8 insertions, 6 deletions
@@ -184,7 +184,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. @@ -768,8 +768,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 { |