diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-10-18 09:08:05 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-10-18 09:08:05 +0200 |
commit | 14eb455c50a457cb298f5dde6258e4a58f2673c1 (patch) | |
tree | 885a3b22cc70017d803a3633af60f88f33d6dd70 | |
parent | 2368ea0dfc317f7a599e1eb5bc5f3dcdb09b4943 (diff) | |
download | rsyslog-14eb455c50a457cb298f5dde6258e4a58f2673c1.tar.gz rsyslog-14eb455c50a457cb298f5dde6258e4a58f2673c1.tar.bz2 rsyslog-14eb455c50a457cb298f5dde6258e4a58f2673c1.zip |
bugfix: potential misadressing when trimming cstr's
-rw-r--r-- | runtime/stringbuf.c | 2 |
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; } |