blobmsg_json: fix buffer growing on blobmsg json formatting

This commit is contained in:
Felix Fietkau 2013-01-29 23:06:55 +01:00
parent 8b0d933154
commit 0bc317aa4d

View file

@ -108,7 +108,7 @@ static bool blobmsg_puts(struct strbuf *s, const char *c, int len)
return true;
if (s->pos + len >= s->len) {
s->len += 16;
s->len += 16 + len;
s->buf = realloc(s->buf, s->len);
if (!s->buf)
return false;