aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-21 12:48:03 +0200
committerMax Kellermann <max@duempel.org>2014-08-21 12:48:03 +0200
commit78abcd7df7ad967c44c884773cc7d39cf3c811a9 (patch)
treedfc2b6c3a61cdae149965ec1eff0a14b93d76898 /src/decoder
parent23dce21647b6b7f3f9ddcb9ad267decf2c7388f0 (diff)
downloadmpd-78abcd7df7ad967c44c884773cc7d39cf3c811a9.tar.gz
mpd-78abcd7df7ad967c44c884773cc7d39cf3c811a9.tar.xz
mpd-78abcd7df7ad967c44c884773cc7d39cf3c811a9.zip
decoer/dsdiff: fix endless loop on malformed file
Same bug as in the previous commit.
Diffstat (limited to 'src/decoder')
-rw-r--r--src/decoder/DsdiffDecoderPlugin.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/decoder/DsdiffDecoderPlugin.cxx b/src/decoder/DsdiffDecoderPlugin.cxx
index 60b2e7624..767395215 100644
--- a/src/decoder/DsdiffDecoderPlugin.cxx
+++ b/src/decoder/DsdiffDecoderPlugin.cxx
@@ -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;