projects
/
oweals
/
libubox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b0d933
)
blobmsg_json: fix buffer growing on blobmsg json formatting
author
Felix Fietkau
<nbd@openwrt.org>
Tue, 29 Jan 2013 22:06:55 +0000
(23:06 +0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Tue, 29 Jan 2013 22:07:10 +0000
(23:07 +0100)
blobmsg_json.c
patch
|
blob
|
history
diff --git
a/blobmsg_json.c
b/blobmsg_json.c
index d4f68465512b2fccc92c0c415049b4458ed947ee..f16635834fb9ccc53ba76515dd08e4f04ab4e2f2 100644
(file)
--- 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;