1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avcodec/imc: Clear padding of buf16

Fixes: use of uninitialized memory
Fixes: 423673969/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IAC_fuzzer-6685890556788736

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer
2025-08-03 14:39:53 +02:00
committed by michaelni
parent ea3851bebf
commit 715df4b1ff

View File

@ -966,6 +966,8 @@ static int imc_decode_frame(AVCodecContext *avctx, AVFrame *frame,
LOCAL_ALIGNED_16(uint16_t, buf16, [(IMC_BLOCK_SIZE + AV_INPUT_BUFFER_PADDING_SIZE) / 2]); LOCAL_ALIGNED_16(uint16_t, buf16, [(IMC_BLOCK_SIZE + AV_INPUT_BUFFER_PADDING_SIZE) / 2]);
memset(buf16 + IMC_BLOCK_SIZE/2, 0, AV_INPUT_BUFFER_PADDING_SIZE);
q->avctx = avctx; q->avctx = avctx;
if (buf_size < IMC_BLOCK_SIZE * avctx->ch_layout.nb_channels) { if (buf_size < IMC_BLOCK_SIZE * avctx->ch_layout.nb_channels) {