Commit d164ad32 authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 14bec7dc
...@@ -363,7 +363,7 @@ static int ivi_init_tiles(IVIBandDesc *band, IVITile *ref_tile, ...@@ -363,7 +363,7 @@ static int ivi_init_tiles(IVIBandDesc *band, IVITile *ref_tile,
band->mb_size); band->mb_size);
av_freep(&tile->mbs); 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) if (!tile->mbs)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
......
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