[FFmpeg-cvslog] avcodec/hevc/hevcdec: initialize qp_y_tab
Michael Niedermayer
git at videolan.org
Fri Jan 3 20:03:39 EET 2025
ffmpeg | branch: release/7.1 | Michael Niedermayer <michael at niedermayer.cc> | Mon Sep 23 21:21:40 2024 +0200| [82d45cb004a9343caa65cb56bfe30b77d4deac72] | committer: Michael Niedermayer
avcodec/hevc/hevcdec: initialize qp_y_tab
This does not replicate on my setup, thus this is a blind fix based on ossfuzz trace
Fixes: use of uninitialized value
Fixes: 71747/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5427736120721408
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 4fc43e45f9e7ee50d8d244bcdea15b37b5614b9b)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=82d45cb004a9343caa65cb56bfe30b77d4deac72
---
libavcodec/hevc/hevcdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c
index 5dc605f91f..6fe72bd297 100644
--- a/libavcodec/hevc/hevcdec.c
+++ b/libavcodec/hevc/hevcdec.c
@@ -128,7 +128,7 @@ static int pic_arrays_init(HEVCLayerContext *l, const HEVCSPS *sps)
l->filter_slice_edges = av_mallocz(ctb_count);
l->tab_slice_address = av_malloc_array(pic_size_in_ctb,
sizeof(*l->tab_slice_address));
- l->qp_y_tab = av_malloc_array(pic_size_in_ctb,
+ l->qp_y_tab = av_calloc(pic_size_in_ctb,
sizeof(*l->qp_y_tab));
if (!l->qp_y_tab || !l->filter_slice_edges || !l->tab_slice_address)
goto fail;
More information about the ffmpeg-cvslog
mailing list