blobmsg: fix length in blobmsg_check_array
blobmsg_check_array_len expects the length of the full attribute buffer, not just the data length. Due to other missing length checks (fixed in the next commit), this did not show up as a test failure Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
cf2e8eb485
commit
c2fc622b77
1 changed files with 1 additions and 1 deletions
|
@ -114,7 +114,7 @@ bool blobmsg_check_attr_len(const struct blob_attr *attr, bool name, size_t len)
|
||||||
|
|
||||||
int blobmsg_check_array(const struct blob_attr *attr, int type)
|
int blobmsg_check_array(const struct blob_attr *attr, int type)
|
||||||
{
|
{
|
||||||
return blobmsg_check_array_len(attr, type, blob_len(attr));
|
return blobmsg_check_array_len(attr, type, blob_raw_len(attr));
|
||||||
}
|
}
|
||||||
|
|
||||||
int blobmsg_check_array_len(const struct blob_attr *attr, int type,
|
int blobmsg_check_array_len(const struct blob_attr *attr, int type,
|
||||||
|
|
Loading…
Reference in a new issue