[SCM] libav/experimental: hevc: use av_mallocz() for allocating tab_ipm

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Aug 10 16:01:53 UTC 2014


The following commit has been merged in the experimental branch:
commit 6cc94e971933cd38c452172bb048bf760e65cc3e
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Sat Jan 11 20:23:51 2014 +0100

    hevc: use av_mallocz() for allocating tab_ipm
    
    Fixes use of uninitialized memory and out of stack array read.
    Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index 65ad6d9..f8f7e64 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -212,7 +212,7 @@ static int pic_arrays_init(HEVCContext *s, const HEVCSPS *sps)
         goto fail;
 
     s->cbf_luma = av_malloc(sps->min_tb_width * sps->min_tb_height);
-    s->tab_ipm  = av_malloc(min_pu_size);
+    s->tab_ipm  = av_mallocz(min_pu_size);
     s->is_pcm   = av_malloc(min_pu_size);
     if (!s->tab_ipm || !s->cbf_luma || !s->is_pcm)
         goto fail;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list