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-01-23 22:32:57 +0300
committerFelix Fietkau <nbd@openwrt.org>2011-01-23 22:32:57 +0300
commit5e5abe33feb21aff94b6a1bf492d9e6b2cda2d80 (patch)
tree177e2fc79163aec523c9fa830a18d649c2829905 /blobmsg.c
parentfcee2d56bca5ed08c4bfc996064e74e92ceb9137 (diff)
improve validation - add header length
Diffstat (limited to 'blobmsg.c')
-rw-r--r--blobmsg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/blobmsg.c b/blobmsg.c
index cc6b2f3..bddf2c8 100644
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -26,7 +26,7 @@ bool blobmsg_check_attr(const struct blob_attr *attr, bool name)
if (!hdr->namelen && name)
return false;
- if (hdr->namelen > blob_len(attr))
+ if (hdr->namelen > blob_len(attr) - sizeof(struct blobmsg_hdr))
return false;
if (hdr->name[hdr->namelen] != 0)