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)