aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/hevc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-11 20:23:51 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-13 16:11:50 +0100
commit706dca18d0a849dc867f3a6e2b8909e23d2b28ad (patch)
tree90844eb427bc1b9b9348122441ba3120f7c879d9 /libavcodec/hevc.c
parentb3c3dc54a595c0145c2efa4f68728aa928a9c854 (diff)
downloadandroid_external_ffmpeg-706dca18d0a849dc867f3a6e2b8909e23d2b28ad.tar.gz
android_external_ffmpeg-706dca18d0a849dc867f3a6e2b8909e23d2b28ad.tar.bz2
android_external_ffmpeg-706dca18d0a849dc867f3a6e2b8909e23d2b28ad.zip
avcodec/hevc: use av_mallocz() for allocating tab_ipm
Fixes use of uninitialized memory and out of stack array read Fixes: signal_sigsegv_ecc526_7846_WPP_C_ericsson_MAIN_2.bit Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 0999f1613bc48ed9d6578a3ad7bcd17610e07fbf) Conflicts: libavcodec/hevc.c
Diffstat (limited to 'libavcodec/hevc.c')
-rw-r--r--libavcodec/hevc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index a16b045a35..8b15ec58b0 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -109,7 +109,7 @@ static int pic_arrays_init(HEVCContext *s)
if (!s->skip_flag || !s->tab_ct_depth)
goto fail;
- s->tab_ipm = av_malloc(pic_size_in_min_pu);
+ s->tab_ipm = av_mallocz(pic_size_in_min_pu);
s->cbf_luma = av_malloc(pic_width_in_min_tu * pic_height_in_min_tu);
s->is_pcm = av_malloc(pic_size_in_min_pu);
if (!s->tab_ipm || !s->cbf_luma || !s->is_pcm)