diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-03-06 10:42:51 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-03-08 08:12:41 +0100 |
commit | f86d66bcfa48998b0727aa0d1089a30cbeae0933 (patch) | |
tree | c913bc23537da2ad60cc288b751dcce8c2b95fd4 /libavcodec/vmdav.c | |
parent | 4c0080b7e7d501e2720d2a61f5186a18377f9d63 (diff) | |
download | ffmpeg-f86d66bcfa48998b0727aa0d1089a30cbeae0933.tar.gz |
vmdaudio: fix invalid reads when packet size is not a multiple of chunk size
CC:libav-stable@libav.org
Diffstat (limited to 'libavcodec/vmdav.c')
-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 b5b5524919..8c6c7d5da4 100644 --- a/libavcodec/vmdav.c +++ b/libavcodec/vmdav.c @@ -627,7 +627,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); |