mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
avcodec/ivi_common: use av_mallocz() to allocate mbs array
Fixes use of uninitialized memory Fixes: msan_uninit-mem_7f1dffa1c016_8245_sasha.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
14bec7dcf8
commit
d164ad3298
@ -363,7 +363,7 @@ static int ivi_init_tiles(IVIBandDesc *band, IVITile *ref_tile,
|
||||
band->mb_size);
|
||||
|
||||
av_freep(&tile->mbs);
|
||||
tile->mbs = av_malloc(tile->num_MBs * sizeof(IVIMbInfo));
|
||||
tile->mbs = av_mallocz(tile->num_MBs * sizeof(IVIMbInfo));
|
||||
if (!tile->mbs)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user