projects
/
project
/
libubox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6bbde6e
)
properly null-terminate formatted json strings
author
Felix Fietkau
<nbd@openwrt.org>
Mon, 7 Feb 2011 00:18:56 +0000
(
01:18
+0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Mon, 7 Feb 2011 00:18:56 +0000
(
01:18
+0100)
blobmsg_json.c
patch
|
blob
|
history
diff --git
a/blobmsg_json.c
b/blobmsg_json.c
index 896a9c2e8c001dd9e25de29298d7ffdb39ec3e36..8195763936a03d8f182127cf5f05a2c4b12d4db0 100644
(file)
--- a/
blobmsg_json.c
+++ b/
blobmsg_json.c
@@
-263,5
+263,7
@@
char *blobmsg_format_json_with_cb(struct blob_attr *attr, bool list, blobmsg_jso
return NULL;
s.buf = realloc(s.buf, s.pos + 1);
+ s.buf[s.pos] = 0;
+
return s.buf;
}