diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-09 16:35:13 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-09 16:35:13 +0200 |
commit | ab40107149038898ef24479a6911d9cd7770a56c (patch) | |
tree | 7a4bd016dd56583263c63e10808859c6ef848ffc /template.c | |
parent | 5221a1e42e16c8c39b48a4a1a18ee6322c38cd17 (diff) | |
parent | 9de685929e4c202d470e07ec28fda41a5efc8eaf (diff) | |
download | rsyslog-ab40107149038898ef24479a6911d9cd7770a56c.tar.gz rsyslog-ab40107149038898ef24479a6911d9cd7770a56c.tar.bz2 rsyslog-ab40107149038898ef24479a6911d9cd7770a56c.zip |
Merge branch 'v4-beta' into v4-devel
Conflicts:
tests/nettester.c
Diffstat (limited to 'template.c')
-rw-r--r-- | template.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -121,8 +121,10 @@ rsRetVal tplToString(struct template *pTpl, msg_t *pMsg, uchar **ppBuf, size_t * if(iBuf + iLenVal + 1 >= *pLenBuf) /* we reserve one char for the final \0! */ CHKiRet(ExtendBuf(ppBuf, pLenBuf, iBuf + iLenVal + 1)); - memcpy(*ppBuf + iBuf, pVal, iLenVal); - iBuf += iLenVal; + if(iLenVal > 0) { /* may be zero depending on property */ + memcpy(*ppBuf + iBuf, pVal, iLenVal); + iBuf += iLenVal; + } if(bMustBeFreed) free(pVal); |