aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vmdav.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-24 22:03:59 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-24 22:03:59 +0100
commit2278ecc434d390bccd32a083a12ab964a6b7b0ce (patch)
tree8ff9d1f26411afe310caf8f8354958d66032b6c7 /libavcodec/vmdav.c
parent66f71f3b5e2e7b6e5049bd9831c371e16aff8a53 (diff)
downloadffmpeg-2278ecc434d390bccd32a083a12ab964a6b7b0ce.tar.gz
vmdav: check that theres enough space for a chunk remaining.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vmdav.c')
-rw-r--r--libavcodec/vmdav.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c
index ec7c967f74..7006f61f2b 100644
--- a/libavcodec/vmdav.c
+++ b/libavcodec/vmdav.c
@@ -618,7 +618,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_end - buf >= s->chunk_size) {
if (s->out_bps == 2) {
decode_audio_s16(output_samples_s16, buf, s->chunk_size,
avctx->channels);