mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-25 14:33:52 +01:00
cbor: fix integer overflow in decode_bytes
This commit is contained in:
parent
a295b0eb91
commit
8255810bab
@ -400,7 +400,7 @@ static size_t decode_bytes(const cbor_stream_t *s, size_t offset, char *out, siz
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (length < bytes_length + 1) {
|
||||
if (bytes_length == SIZE_MAX || length < bytes_length + 1) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user