1 From c2fc622b771f679e8f55060ac60cfe02b9a80995 Mon Sep 17 00:00:00 2001
2 From: Felix Fietkau <nbd@nbd.name>
3 Date: Mon, 25 May 2020 13:44:20 +0200
4 Subject: [PATCH] blobmsg: fix length in blobmsg_check_array
6 blobmsg_check_array_len expects the length of the full attribute buffer,
7 not just the data length.
8 Due to other missing length checks (fixed in the next commit), this did
9 not show up as a test failure
11 Signed-off-by: Felix Fietkau <nbd@nbd.name>
14 1 file changed, 1 insertion(+), 1 deletion(-)
18 @@ -120,7 +120,7 @@ bool blobmsg_check_attr_len(const struct
20 int blobmsg_check_array(const struct blob_attr *attr, int type)
22 - return blobmsg_check_array_len(attr, type, blob_len(attr));
23 + return blobmsg_check_array_len(attr, type, blob_raw_len(attr));
26 int blobmsg_check_array_len(const struct blob_attr *attr, int type,