[FFmpeg-cvslog] vmdav: check that theres enough space for a chunk remaining.

Michael Niedermayer git at videolan.org
Sun Dec 25 00:23:38 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Dec 24 22:03:59 2011 +0100| [2278ecc434d390bccd32a083a12ab964a6b7b0ce] | committer: Michael Niedermayer

vmdav: check that theres enough space for a chunk remaining.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2278ecc434d390bccd32a083a12ab964a6b7b0ce
---

 libavcodec/vmdav.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c
index ec7c967..7006f61 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);



More information about the ffmpeg-cvslog mailing list