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>2011-02-07 19:47:02 +0300
committerFelix Fietkau <nbd@openwrt.org>2011-02-07 19:47:02 +0300
commit81839e259a5de56b6eaa487e53eda1ac29ab1c59 (patch)
tree32b6a19a97a290dc24b7874570bae8d6f75ac2f0 /blobmsg_json.c
parent07dbea00588bf322e16076cf7d818a13f934301f (diff)
validate blobmsg attributes before converting them to json
Diffstat (limited to 'blobmsg_json.c')
-rw-r--r--blobmsg_json.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/blobmsg_json.c b/blobmsg_json.c
index 8195763..6a6014b 100644
--- 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);