aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-09-23 21:21:40 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2024-12-02 03:14:49 +0100
commit4fc43e45f9e7ee50d8d244bcdea15b37b5614b9b (patch)
tree958451098f2550c9522e4168316cf2875d120d48
parentf52b9d05837c23b0c55013551bc28dce4922de0b (diff)
downloadffmpeg-4fc43e45f9e7ee50d8d244bcdea15b37b5614b9b.tar.gz
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@niedermayer.cc>
-rw-r--r--libavcodec/hevc/hevcdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c
index fe8897fb6e..be35a9de82 100644
--- a/libavcodec/hevc/hevcdec.c
+++ b/libavcodec/hevc/hevcdec.c
@@ -129,7 +129,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;