diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2020-05-16 23:22:10 +0300 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2020-05-24 17:54:37 +0300 |
commit | 86818eaa976b0d396c1eabfdce307c33a48c0309 (patch) | |
tree | 90d59295ea874cc214583ec757e7d21f12ee953e /blob.c | |
parent | 5e75160f48785464f9213c6bc8c72b9372c5318b (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |