[FFmpeg-cvslog] avcodec/aic: Clear slice_data

Michael Niedermayer git at videolan.org
Wed Aug 14 19:23:28 EEST 2024


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Aug  4 22:30:03 2024 +0200| [de3f6c8888bcf3df4ca6cb265a83507b95c884cd] | committer: Michael Niedermayer

avcodec/aic: Clear slice_data

Fixes: use-of-uninitialized-value
Fixes: 70865/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AIC_fuzzer-4874102695854080

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=de3f6c8888bcf3df4ca6cb265a83507b95c884cd
---

 libavcodec/aic.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/aic.c b/libavcodec/aic.c
index 3ff170b414..e12d689c47 100644
--- a/libavcodec/aic.c
+++ b/libavcodec/aic.c
@@ -465,8 +465,7 @@ static av_cold int aic_decode_init(AVCodecContext *avctx)
         }
     }
 
-    ctx->slice_data = av_malloc_array(ctx->slice_width, AIC_BAND_COEFFS
-                                * sizeof(*ctx->slice_data));
+    ctx->slice_data = av_calloc(ctx->slice_width, AIC_BAND_COEFFS * sizeof(*ctx->slice_data));
     if (!ctx->slice_data) {
         av_log(avctx, AV_LOG_ERROR, "Error allocating slice buffer\n");
 



More information about the ffmpeg-cvslog mailing list