diff mbox series

[FFmpeg-devel,8/8] avcodec/alsdec: clear last_acf_mantissa

Message ID 20240804205309.1978196-8-michael@niedermayer.cc
State New
Headers show
Series [FFmpeg-devel,1/8] avcodec/apac: Clean padding space | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Michael Niedermayer Aug. 4, 2024, 8:53 p.m. UTC
Fixes: use-of-uninitialized-value
Fixes: 70869/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5476567461986304

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/alsdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index f4f67917d76..28f20799854 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -2112,7 +2112,7 @@  static av_cold int decode_init(AVCodecContext *avctx)
         ctx->acf               = av_malloc_array(channels, sizeof(*ctx->acf));
         ctx->shift_value       = av_calloc(channels, sizeof(*ctx->shift_value));
         ctx->last_shift_value  = av_calloc(channels, sizeof(*ctx->last_shift_value));
-        ctx->last_acf_mantissa = av_malloc_array(channels, sizeof(*ctx->last_acf_mantissa));
+        ctx->last_acf_mantissa = av_calloc(channels, sizeof(*ctx->last_acf_mantissa));
         ctx->raw_mantissa      = av_calloc(channels, sizeof(*ctx->raw_mantissa));
 
         ctx->larray = av_malloc_array(ctx->cur_frame_length * 4, sizeof(*ctx->larray));