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:
07dbea0
)
validate blobmsg attributes before converting them to json
author
Felix Fietkau
<nbd@openwrt.org>
Mon, 7 Feb 2011 16:47:02 +0000
(17:47 +0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Mon, 7 Feb 2011 16:47:02 +0000
(17:47 +0100)
blobmsg_json.c
patch
|
blob
|
history
diff --git
a/blobmsg_json.c
b/blobmsg_json.c
index 8195763936a03d8f182127cf5f05a2c4b12d4db0..6a6014b1f9837dd8537b4d845b4b8bf768859cd8 100644
(file)
--- a/
blobmsg_json.c
+++ b/
blobmsg_json.c
@@
-180,6
+180,9
@@
static void blobmsg_format_element(struct strbuf *s, struct blob_attr *attr, boo
void *data;
int len;
+ if (!blobmsg_check_attr(attr, false))
+ return;
+
if (!array && blobmsg_name(attr)[0]) {
blobmsg_format_string(s, blobmsg_name(attr));
blobmsg_puts(s, ":", 1);