From 2278ecc434d390bccd32a083a12ab964a6b7b0ce Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 24 Dec 2011 22:03:59 +0100 Subject: vmdav: check that theres enough space for a chunk remaining. Signed-off-by: Michael Niedermayer --- libavcodec/vmdav.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/vmdav.c') 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); -- cgit v1.2.3