validate blobmsg attributes before converting them to json

This commit is contained in:
Felix Fietkau 2011-02-07 17:47:02 +01:00
parent 07dbea0058
commit 81839e259a

View file

@ -180,6 +180,9 @@ static void blobmsg_format_element(struct strbuf *s, struct blob_attr *attr, boo
void *data; void *data;
int len; int len;
if (!blobmsg_check_attr(attr, false))
return;
if (!array && blobmsg_name(attr)[0]) { if (!array && blobmsg_name(attr)[0]) {
blobmsg_format_string(s, blobmsg_name(attr)); blobmsg_format_string(s, blobmsg_name(attr));
blobmsg_puts(s, ":", 1); blobmsg_puts(s, ":", 1);