summaryrefslogtreecommitdiffstats
path: root/runtime
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 /runtime
parent9bea045e60fa612336ae6a78267284bcec2e9e25 (diff)
downloadrsyslog-fcb98138a683c90e484e46eccb5c69e1034e1366.tar.gz
rsyslog-fcb98138a683c90e484e46eccb5c69e1034e1366.tar.xz
rsyslog-fcb98138a683c90e484e46eccb5c69e1034e1366.zip
Added MsgDup bugfix from v5-stable into v4-stable branch
Diffstat (limited to 'runtime')
-rw-r--r--runtime/msg.c2
1 files changed, 1 insertions, 1 deletions
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);