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:
Diffstat (limited to 'blobmsg.c')
-rw-r--r--blobmsg.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/blobmsg.c b/blobmsg.c
index 7da4183..93172ab 100644
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -195,9 +195,17 @@ int blobmsg_parse(const struct blobmsg_policy *policy, int policy_len,
continue;
if (policy[i].type != BLOBMSG_TYPE_UNSPEC &&
+ policy[i].type != BLOBMSG_CAST_INT64 &&
blob_id(attr) != policy[i].type)
continue;
+ if (policy[i].type == BLOBMSG_CAST_INT64 &&
+ (blob_id(attr) != BLOBMSG_TYPE_INT64 &&
+ blob_id(attr) != BLOBMSG_TYPE_INT32 &&
+ blob_id(attr) != BLOBMSG_TYPE_INT16 &&
+ blob_id(attr) != BLOBMSG_TYPE_INT8))
+ continue;
+
if (blobmsg_namelen(hdr) != pslen[i])
continue;