Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-01-30 02:06:55 +0400
committerFelix Fietkau <nbd@openwrt.org>2013-01-30 02:07:10 +0400
commit0bc317aa4d9af44806c28ca286d79a8b5a92b2b8 (patch)
treeb824be2bd1b2fe4896c4c82ea77be271328ecead /blobmsg_json.c
parent8b0d9331547b7d784278e38564f416d61387082c (diff)
blobmsg_json: fix buffer growing on blobmsg json formatting
Diffstat (limited to 'blobmsg_json.c')
-rw-r--r--blobmsg_json.c2
1 files changed, 1 insertions, 1 deletions
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;