summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Lorbach <alorbach@adiscon.com>2011-08-11 10:57:06 +0200
committerAndre Lorbach <alorbach@adiscon.com>2011-08-11 10:57:06 +0200
commitfcb98138a683c90e484e46eccb5c69e1034e1366 (patch)
tree78c37d4ac79b116c8e2456f745c00f3360eb6460
parent9bea045e60fa612336ae6a78267284bcec2e9e25 (diff)
downloadrsyslog-fcb98138a683c90e484e46eccb5c69e1034e1366.tar.gz
rsyslog-fcb98138a683c90e484e46eccb5c69e1034e1366.tar.xz
rsyslog-fcb98138a683c90e484e46eccb5c69e1034e1366.zip
Added MsgDup bugfix from v5-stable into v4-stable branch
-rw-r--r--ChangeLog1
-rw-r--r--runtime/msg.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 785a60eb..721104fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@ Version 4.6.8 [v4-stable] (rgerhards), 2011-??-??
- bugfix: memcpy overflow can occur in allowed sender checkig
if a name is resolved to IPv4-mapped-on-IPv6 address
Found by Ismail Dönmez at suse
+- bugfix: The NUL-Byte for the syslogtag was not copied in MsgDup (msg.c)
---------------------------------------------------------------------------
Version 4.6.7 [v4-stable] (rgerhards), 2011-07-11
- added support for the ":omusrmsg:" syntax in configuring user messages
diff --git a/runtime/msg.c b/runtime/msg.c
index 0dbcdefd..c8046d1b 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -888,7 +888,7 @@ msg_t* MsgDup(msg_t* pOld)
*/
if(pOld->iLenTAG > 0) {
if(pOld->iLenTAG < CONF_TAG_BUFSIZE) {
- memcpy(pNew->TAG.szBuf, pOld->TAG.szBuf, pOld->iLenTAG);
+ memcpy(pNew->TAG.szBuf, pOld->TAG.szBuf, pOld->iLenTAG + 1);
} else {
if((pNew->TAG.pszTAG = srUtilStrDup(pOld->TAG.pszTAG, pOld->iLenTAG)) == NULL) {
msgDestruct(&pNew);