[FFmpeg-cvslog] Fix potential overread in vmd audio decoder.
Laurent Aimar
git at videolan.org
Sun Sep 25 00:24:09 CEST 2011
ffmpeg | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Sep 24 23:16:17 2011 +0200| [00cbe9e4053fd562b6f21e76aca6636ff926b637] | committer: Michael Niedermayer
Fix potential overread in vmd audio decoder.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=00cbe9e4053fd562b6f21e76aca6636ff926b637
---
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;
More information about the ffmpeg-cvslog
mailing list