diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-01-11 20:23:51 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-01-11 20:30:22 +0100 |
commit | 0999f1613bc48ed9d6578a3ad7bcd17610e07fbf (patch) | |
tree | b000438566132ec5c0681a0800839ff2bf3e109a /libavcodec | |
parent | d5af400713951b322e9deb1bb99b681416a08522 (diff) | |
download | ffmpeg-streaming-0999f1613bc48ed9d6578a3ad7bcd17610e07fbf.zip ffmpeg-streaming-0999f1613bc48ed9d6578a3ad7bcd17610e07fbf.tar.gz |
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>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/hevc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 43d10f0..9c33da0 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -107,7 +107,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; |