blobmsg: simplify and fix name length checks in blobmsg_check_name
authorFelix Fietkau <nbd@nbd.name>
Mon, 25 May 2020 12:49:35 +0000 (14:49 +0200)
committerFelix Fietkau <nbd@nbd.name>
Tue, 26 May 2020 08:06:53 +0000 (10:06 +0200)
commit639c29d19717616b809d9a1e9042461ab8024370
tree93bcda56106227de2de8b3bad4279e5e58a91d62
parentc2fc622b771f679e8f55060ac60cfe02b9a80995
blobmsg: simplify and fix name length checks in blobmsg_check_name

blobmsg_hdr_valid_namelen was omitted when name==false
The blob_len vs blobmsg_namelen changes were not taking into account
potential padding between name and data

Signed-off-by: Felix Fietkau <nbd@nbd.name>
blobmsg.c