aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2025-08-06 13:36:06 +0200
committermichaelni <michael@niedermayer.cc>2025-08-07 19:44:59 +0000
commit70fc46d185663dbea0995bf868d66b58b388119e (patch)
tree225982146c75c6104030af156f9e9cbe025a193b
parent032dfe8584c4675f3253ebb5e333e834f55f7562 (diff)
downloadffmpeg-70fc46d185663dbea0995bf868d66b58b388119e.tar.gz
avcodec/ffv1: Clear state on alloc
Fixes: use of uninitialized memory Fixes: 428969823/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_DEC_fuzzer-5909681623334912 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/ffv1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index 885cef265f..812989a892 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -79,7 +79,7 @@ av_cold int ff_ffv1_init_slice_state(const FFV1Context *f,
if (f->ac != AC_GOLOMB_RICE) {
if (!p->state)
- p->state = av_malloc_array(p->context_count, CONTEXT_SIZE *
+ p->state = av_calloc(p->context_count, CONTEXT_SIZE *
sizeof(uint8_t));
if (!p->state)
return AVERROR(ENOMEM);