Merge pull request #7706 from nmeum/coap-integer-overflow
cbor: fix integer overflow in decode_bytes
This commit is contained in:
commit
56513ea953
@ -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