mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
Fix potential overread in vmd audio decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
eae3cf06a5
commit
00cbe9e405
@ -523,7 +523,10 @@ static int vmdaudio_decode_frame(AVCodecContext *avctx,
|
|||||||
|
|
||||||
silent_chunks = 0;
|
silent_chunks = 0;
|
||||||
if (block_type == BLOCK_TYPE_INITIAL) {
|
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);
|
silent_chunks = av_popcount(flags);
|
||||||
buf += 4;
|
buf += 4;
|
||||||
buf_size -= 4;
|
buf_size -= 4;
|
||||||
|
Loading…
Reference in New Issue
Block a user