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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/blobmsg.c b/blobmsg.c
index c2bb717..8019c45 100644
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -135,6 +135,8 @@ int blobmsg_parse(const struct blobmsg_policy *policy, int policy_len,
int i;
memset(tb, 0, policy_len * sizeof(*tb));
+ if (!data || !len)
+ return -EINVAL;
pslen = alloca(policy_len);
for (i = 0; i < policy_len; i++) {
if (!policy[i].name)