[FFmpeg-devel] [PATCH 1/3] Fix potential overread in vmd audio decoder.
fenrir at elivagar.org
fenrir at elivagar.org
Sat Sep 24 23:16:17 CEST 2011
From: Laurent Aimar <fenrir at videolan.org>
---
libavcodec/vmdav.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c
index 9197891..77e0432 100644
--- a/libavcodec/vmdav.c
+++ b/libavcodec/vmdav.c
@@ -523,7 +523,10 @@ static int vmdaudio_decode_frame(AVCodecContext *avctx,
silent_chunks = 0;
if (block_type == BLOCK_TYPE_INITIAL) {
- uint32_t flags = AV_RB32(buf);
+ uint32_t flags;
+ if (buf_size < 4)
+ return -1;
+ flags = AV_RB32(buf);
silent_chunks = av_popcount(flags);
buf += 4;
buf_size -= 4;
--
1.7.2.5
More information about the ffmpeg-devel
mailing list