aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-03-06 10:42:51 +0100
committerReinhard Tartler <siretart@tauware.de>2013-03-09 18:54:28 +0100
commit98406bd26e6d29bf782ab1456aa084fafc102a71 (patch)
treed95bf6830789a87f18cfc835f7fe236c8cc9577e
parente050af9a809bd4e223c89e280ebd94da0e1034b5 (diff)
downloadffmpeg-98406bd26e6d29bf782ab1456aa084fafc102a71.tar.gz
vmdaudio: fix invalid reads when packet size is not a multiple of chunk size
CC:libav-stable@libav.org (cherry picked from commit f86d66bcfa48998b0727aa0d1089a30cbeae0933) Signed-off-by: Reinhard Tartler <siretart@tauware.de> (cherry picked from commit 77cf052e395b1fac8dd181d4f76b0101d1acd625) Signed-off-by: Reinhard Tartler <siretart@tauware.de>
-rw-r--r--libavcodec/vmdav.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c
index 89b5c2bc6a..570c362a57 100644
--- a/libavcodec/vmdav.c
+++ b/libavcodec/vmdav.c
@@ -625,7 +625,7 @@ static int vmdaudio_decode_frame(AVCodecContext *avctx, void *data,
/* decode audio chunks */
if (audio_chunks > 0) {
buf_end = buf + buf_size;
- while (buf < buf_end) {
+ while (buf + s->chunk_size <= buf_end) {
if (s->out_bps == 2) {
decode_audio_s16(output_samples_s16, buf, s->chunk_size,
avctx->channels);