[FFmpeg-cvslog] avcodec/ivi_common: use av_mallocz() to allocate mbs array

Michael Niedermayer git at videolan.org
Thu Dec 26 16:20:54 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Dec 23 18:09:58 2013 +0100| [d164ad3298c155330e303bea907920643b5d74a3] | committer: 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: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d164ad3298c155330e303bea907920643b5d74a3
---

 libavcodec/ivi_common.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
index 9b5f5f8..a4d2434 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);
 



More information about the ffmpeg-cvslog mailing list