提交 d99b2bed 编写于 作者: M Minglei Jin

http/string: append need one more byte for null

上级 18c0457a
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册