blobmsg_json: fix buffer growing on blobmsg json formatting
This commit is contained in:
parent
8b0d933154
commit
0bc317aa4d
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue