summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);