aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-17 19:42:57 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-22 03:17:55 +0100
commite911f125fc30bcb271ee30b34400eb55c623fd56 (patch)
tree86d8bdd045d74a37f9f7890ddeba6ae2359d1d81
parent5aead5ee053742717c7cb2ccaf3a34bcf8a67567 (diff)
downloadffmpeg-e911f125fc30bcb271ee30b34400eb55c623fd56.tar.gz
avcodec/hevc: clear filter_slice_edges() on allocation
This avoids use of uninitialized memory Fixes: asan_static-oob_17aa046_582_cov_212287884_DBLK_G_VIXS_1.bit Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 8aa8d12554868c32436750f881954193087219c8) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/hevc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index d4dc52c9dd..9b683d99df 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -108,7 +108,7 @@ static int pic_arrays_init(HEVCContext *s, const HEVCSPS *sps)
if (!s->tab_ipm || !s->cbf_luma || !s->is_pcm)
goto fail;
- s->filter_slice_edges = av_malloc(ctb_count);
+ s->filter_slice_edges = av_mallocz(ctb_count);
s->tab_slice_address = av_malloc_array(pic_size_in_ctb,
sizeof(*s->tab_slice_address));
s->qp_y_tab = av_malloc_array(pic_size_in_ctb,