[FFmpeg-cvslog] avcodec/hevc: clear filter_slice_edges() on allocation

Michael Niedermayer git at videolan.org
Tue Dec 30 16:12:42 CET 2014


ffmpeg | branch: release/2.1 | Michael Niedermayer <michaelni at gmx.at> | Wed Dec 17 19:42:57 2014 +0100| [9dc6a7f13a23110c04568e890ef340f014c23303] | committer: Michael Niedermayer

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 at gmx.at>
(cherry picked from commit 8aa8d12554868c32436750f881954193087219c8)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

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

diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index 9633511..bdfc131 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -115,7 +115,7 @@ static int pic_arrays_init(HEVCContext *s)
     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,



More information about the ffmpeg-cvslog mailing list