Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/blob.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2020-05-16 23:22:10 +0300
committerMatthias Schiffer <mschiffer@universe-factory.net>2020-05-24 17:54:37 +0300
commit86818eaa976b0d396c1eabfdce307c33a48c0309 (patch)
tree90d59295ea874cc214583ec757e7d21f12ee953e /blob.c
parent5e75160f48785464f9213c6bc8c72b9372c5318b (diff)
blob: make blob_parse_untrusted more permissive
Some tools like ucert use concatenations of multiple blobs. Account for this case by allowing the underlying buffer length to be greater than the blob length. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Diffstat (limited to 'blob.c')
-rw-r--r--blob.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/blob.c b/blob.c
index 528e717..433becb 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);