Some tools like ucert use concatenations of multiple blobs. Account for
this case by allowing the underlying buffer length to be greater than
the blog length.

Signed-off-by: Matthias Schiffer <mschif...@universe-factory.net>
---
 blob.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/blob.c b/blob.c
index 528e717615d6..433becb904f5 100644
--- a/blob.c
+++ b/blob.c
@@ -277,7 +277,7 @@ blob_parse_untrusted(struct blob_attr *attr, size_t 
attr_len, struct blob_attr *
                return 0;
 
        len = blob_raw_len(attr);
-       if (len != attr_len)
+       if (attr_len < len)
                return 0;
 
        memset(data, 0, sizeof(struct blob_attr *) * max);
-- 
2.26.2


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to