From 7a40524f9bdbe2febce88ccbf34e763aac635ded Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 18 Oct 2013 09:08:05 +0200 Subject: bugfix: potential misadressing when trimming cstr's --- runtime/stringbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/stringbuf.c') 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; } -- cgit v1.2.3