decoder/dsf: add range check
This commit is contained in:
parent
0ad2eb34c7
commit
9dcbd005f0
@ -151,6 +151,9 @@ dsf_read_metadata(Decoder *decoder, InputStream &is,
|
|||||||
we use the actual data size as chunk size */
|
we use the actual data size as chunk size */
|
||||||
|
|
||||||
uint64_t data_size = data_chunk.size.Read();
|
uint64_t data_size = data_chunk.size.Read();
|
||||||
|
if (data_size < sizeof(data_chunk))
|
||||||
|
return false;
|
||||||
|
|
||||||
data_size -= sizeof(data_chunk);
|
data_size -= sizeof(data_chunk);
|
||||||
|
|
||||||
metadata->chunk_size = data_size;
|
metadata->chunk_size = data_size;
|
||||||
|
Loading…
Reference in New Issue
Block a user