From 0bc317aa4d9af44806c28ca286d79a8b5a92b2b8 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 29 Jan 2013 23:06:55 +0100 Subject: [PATCH] blobmsg_json: fix buffer growing on blobmsg json formatting --- blobmsg_json.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blobmsg_json.c b/blobmsg_json.c index d4f6846..f166358 100644 --- a/blobmsg_json.c +++ b/blobmsg_json.c @@ -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; -- 2.25.1