http/string: append need one more byte for null
This commit is contained in:
parent
18c0457af2
commit
d99b2bed1b
|
@ -110,7 +110,7 @@ static void httpCleanupString(HttpString *str) {
|
|||
static int32_t httpAppendString(HttpString *str, const char *s, int32_t len) {
|
||||
if (str->size == 0) {
|
||||
str->pos = 0;
|
||||
str->size = len;
|
||||
str->size = len + 1;
|
||||
str->str = malloc(str->size);
|
||||
} else if (str->pos + len + 1 >= str->size) {
|
||||
str->size += len;
|
||||
|
|
Loading…
Reference in New Issue