diff options
author | Max Kellermann <max@duempel.org> | 2013-10-28 23:41:51 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-28 23:41:51 +0100 |
commit | 9dcbd005f0087c5644d86db4eb1b24cc0c39d132 (patch) | |
tree | b7e38861840b86ec81fc4f5aa113d9051f82f45d | |
parent | 0ad2eb34c74dc128e7884552ef1f930f3f495066 (diff) | |
download | mpd-9dcbd005f0087c5644d86db4eb1b24cc0c39d132.tar.gz mpd-9dcbd005f0087c5644d86db4eb1b24cc0c39d132.tar.xz mpd-9dcbd005f0087c5644d86db4eb1b24cc0c39d132.zip |
decoder/dsf: add range check
Diffstat (limited to '')
-rw-r--r-- | src/decoder/DsfDecoderPlugin.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/decoder/DsfDecoderPlugin.cxx b/src/decoder/DsfDecoderPlugin.cxx index a9eaebcbc..a7e2f3d1e 100644 --- a/src/decoder/DsfDecoderPlugin.cxx +++ b/src/decoder/DsfDecoderPlugin.cxx @@ -151,6 +151,9 @@ dsf_read_metadata(Decoder *decoder, InputStream &is, we use the actual data size as chunk size */ uint64_t data_size = data_chunk.size.Read(); + if (data_size < sizeof(data_chunk)) + return false; + data_size -= sizeof(data_chunk); metadata->chunk_size = data_size; |