summaryrefslogtreecommitdiffstats
path: root/runtime/stringbuf.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-10-18 09:08:05 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2013-10-18 09:16:24 +0200
commit7a40524f9bdbe2febce88ccbf34e763aac635ded (patch)
tree48484016a9ccdbba59725d2258ebefcde517e08d /runtime/stringbuf.c
parent38f657ff2ec0369c083571f4e5e30aba6f1cdbb7 (diff)
downloadrsyslog-7a40524f9bdbe2febce88ccbf34e763aac635ded.tar.gz
rsyslog-7a40524f9bdbe2febce88ccbf34e763aac635ded.tar.bz2
rsyslog-7a40524f9bdbe2febce88ccbf34e763aac635ded.zip
bugfix: potential misadressing when trimming cstr's
Diffstat (limited to 'runtime/stringbuf.c')
-rw-r--r--runtime/stringbuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/stringbuf.c b/runtime/stringbuf.c
index 6a6f7c81..13f38710 100644
--- a/runtime/stringbuf.c
+++ b/runtime/stringbuf.c
@@ -564,7 +564,7 @@ rsRetVal cstrTrimTrailingWhiteSpace(cstr_t *pThis)
}
/* i now is the new string length! */
pThis->iStrLen = i;
- pThis->pBuf[pThis->iStrLen] = '0'; /* we always have this space */
+ pThis->pBuf[pThis->iStrLen] = '\0'; /* we always have this space */
done: return RS_RET_OK;
}