Commit 00cbe9e4 authored by Laurent Aimar's avatar Laurent Aimar Committed by Michael Niedermayer

Fix potential overread in vmd audio decoder.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent eae3cf06
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment