diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-12-23 18:09:58 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-26 14:53:39 +0100 |
commit | d164ad3298c155330e303bea907920643b5d74a3 (patch) | |
tree | a6e392f539dbca4277a9605fc12a731cdcc4c6d4 /libavcodec/ivi_common.c | |
parent | 14bec7dcf8299f35fff1e2158c6cb8c6d6b2e083 (diff) | |
download | ffmpeg-d164ad3298c155330e303bea907920643b5d74a3.tar.gz |
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>
Diffstat (limited to 'libavcodec/ivi_common.c')
-rw-r--r-- | libavcodec/ivi_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c index 9b5f5f876e..a4d24345a7 100644 --- a/libavcodec/ivi_common.c +++ b/libavcodec/ivi_common.c @@ -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); |