aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-08-07 22:55:03 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2025-01-01 21:33:45 +0100
commit9de721de709fa9cc06a3ce3f542a1e7d45b2b0bf (patch)
treeace72374af84b589812aeb2ba7c4cf27f301fb0a
parent7eeeda703b599847aa89c7c08bb433d0b3da9590 (diff)
downloadffmpeg-9de721de709fa9cc06a3ce3f542a1e7d45b2b0bf.tar.gz
avcodec/cfhdenc: Clear dwt_tmp
This occurs on a 32x32 input Fixes: use of uninitialized value Fixes: 70897/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-5960860961406976 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/cfhdenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/cfhdenc.c b/libavcodec/cfhdenc.c
index 3be6798d8d..ceea15efc4 100644
--- a/libavcodec/cfhdenc.c
+++ b/libavcodec/cfhdenc.c
@@ -285,7 +285,7 @@ static av_cold int cfhd_encode_init(AVCodecContext *avctx)
s->plane[i].dwt_buf =
av_calloc(h8 * 8 * w8 * 8, sizeof(*s->plane[i].dwt_buf));
s->plane[i].dwt_tmp =
- av_malloc_array(h8 * 8 * w8 * 8, sizeof(*s->plane[i].dwt_tmp));
+ av_calloc(h8 * 8 * w8 * 8, sizeof(*s->plane[i].dwt_tmp));
if (!s->plane[i].dwt_buf || !s->plane[i].dwt_tmp)
return AVERROR(ENOMEM);