mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-25 12:40:01 +00:00
avformat/mpc8: clear buffer padding area
Fixes use of uninitialized memory Fixes: msan_uninit-mem_7fa6a48cd1d5_8853_sv8_notags.mpc Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
e079661d23
commit
e33b6ccfa7
@ -157,6 +157,8 @@ static void mpc8_parse_seektable(AVFormatContext *s, int64_t off)
|
||||
if(!(buf = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE)))
|
||||
return;
|
||||
avio_read(s->pb, buf, size);
|
||||
memset(buf+size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
|
||||
init_get_bits(&gb, buf, size * 8);
|
||||
size = gb_get_v(&gb);
|
||||
if(size > UINT_MAX/4 || size > c->samples/1152){
|
||||
|
Loading…
Reference in New Issue
Block a user