decoer/dsdiff: fix endless loop on malformed file

Same bug as in the previous commit.
This commit is contained in:
Max Kellermann 2014-08-21 12:48:03 +02:00
parent 23dce21647
commit 78abcd7df7
2 changed files with 2 additions and 2 deletions

2
NEWS
View File

@ -1,6 +1,6 @@
ver 0.18.13 (not yet released)
* decoder
- dsf: fix endless loop on malformed file
- dsdiff, dsf: fix endless loop on malformed file
- ffmpeg: support ffmpeg/libav version 11
ver 0.18.12 (2014/07/30)

View File

@ -377,7 +377,7 @@ dsdiff_decode_chunk(Decoder &decoder, InputStream &is,
const unsigned buffer_samples = buffer_frames * frame_size;
const size_t buffer_size = buffer_samples * sample_size;
while (chunk_size > 0) {
while (chunk_size >= frame_size) {
/* see how much aligned data from the remaining chunk
fits into the local buffer */
size_t now_size = buffer_size;