diff options
author | Andre Lorbach <alorbach@adiscon.com> | 2011-08-10 17:27:21 +0200 |
---|---|---|
committer | Andre Lorbach <alorbach@adiscon.com> | 2011-08-10 17:27:21 +0200 |
commit | 5722fde8e93a351c0b72fb60a799c66548a7addb (patch) | |
tree | ff9b693769e83218a9fad33aa9017b0e850886f8 /runtime | |
parent | 83a670b33357bd1d384e04b3897739de90be6144 (diff) | |
download | rsyslog-5722fde8e93a351c0b72fb60a799c66548a7addb.tar.gz rsyslog-5722fde8e93a351c0b72fb60a799c66548a7addb.tar.xz rsyslog-5722fde8e93a351c0b72fb60a799c66548a7addb.zip |
Fixed BUG in MsgDup (msg.c), the NULL Byte was not copied for the SyslogTag
The syslogtag of the duplicated message could get contain garbage at the end
as the string terminating NULL Byte was missing.
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/msg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/msg.c b/runtime/msg.c index cc7b463d..9fdaded3 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -967,7 +967,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); |