[FFmpeg-cvslog] vmdaudio: fix invalid reads when packet size is not a multiple of chunk size
Anton Khirnov
git at videolan.org
Thu Mar 14 04:24:06 CET 2013
ffmpeg | branch: release/1.1 | Anton Khirnov <anton at khirnov.net> | Wed Mar 6 10:42:51 2013 +0100| [77cf052e395b1fac8dd181d4f76b0101d1acd625] | committer: Reinhard Tartler
vmdaudio: fix invalid reads when packet size is not a multiple of chunk size
CC:libav-stable at libav.org
(cherry picked from commit f86d66bcfa48998b0727aa0d1089a30cbeae0933)
Signed-off-by: Reinhard Tartler <siretart at tauware.de>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=77cf052e395b1fac8dd181d4f76b0101d1acd625
---
libavcodec/vmdav.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c
index cffc00a..2bb1fc3 100644
--- a/libavcodec/vmdav.c
+++ b/libavcodec/vmdav.c
@@ -631,7 +631,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);
More information about the ffmpeg-cvslog
mailing list