Fix missing null terminator in textblock.

Although I used 3 lines comments to state it was not required, it is
required because none of the values accounted includes the '\0'.


SVN revision: 33940
This commit is contained in:
Gustavo Sverzut Barbieri 2008-03-06 01:06:58 +00:00
parent 23c566bb07
commit 79a5be8ec3
1 changed files with 1 additions and 4 deletions

View File

@ -334,10 +334,7 @@ _strbuf_insert(char *strbuf, const char *text, int pos, int *strbuf_len, int *st
pos = 0;
text_len = strlen(text);
/* ATTENTION: no + 1 is required for req_alloc as text will be
* inserted before the end of the string.
*/
req_alloc = *strbuf_len + text_len;
req_alloc = *strbuf_len + text_len + 1;
if (!_strbuf_grow_if_required(&strbuf, strbuf_alloc, req_alloc))
return strbuf;