validate blobmsg attributes before converting them to json
This commit is contained in:
parent
07dbea0058
commit
81839e259a
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue