diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-24 22:03:59 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-03 22:31:46 +0100 |
commit | 6210d62c5fa17c318432cdc66edaaac730aca734 (patch) | |
tree | 8a8abdcde0841af3efc452e523380ca6b2bba4a1 | |
parent | a1666ae8f053cee554718ee77d030e0415427360 (diff) | |
download | ffmpeg-6210d62c5fa17c318432cdc66edaaac730aca734.tar.gz |
vmdav: check that theres enough space for a chunk remaining.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2278ecc434d390bccd32a083a12ab964a6b7b0ce)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/vmdav.c | 2 |
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); |