summaryrefslogtreecommitdiffstats
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:08:05 +0200
commit14eb455c50a457cb298f5dde6258e4a58f2673c1 (patch)
tree885a3b22cc70017d803a3633af60f88f33d6dd70
parent2368ea0dfc317f7a599e1eb5bc5f3dcdb09b4943 (diff)
downloadrsyslog-14eb455c50a457cb298f5dde6258e4a58f2673c1.tar.gz
rsyslog-14eb455c50a457cb298f5dde6258e4a58f2673c1.tar.bz2
rsyslog-14eb455c50a457cb298f5dde6258e4a58f2673c1.zip
bugfix: potential misadressing when trimming cstr's
-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;
}