[FFmpeg-cvslog] avcodec/apac: Clean padding space
Michael Niedermayer
git at videolan.org
Wed Aug 14 19:23:20 EEST 2024
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Aug 4 21:20:55 2024 +0200| [8ca072a373f5e2b6689a8649c79a03d12db5eb0b] | committer: Michael Niedermayer
avcodec/apac: Clean padding space
Fixes: use-of-uninitialized-value
Fixes: 70842/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APAC_fuzzer-5758325067677696
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=8ca072a373f5e2b6689a8649c79a03d12db5eb0b
---
libavcodec/apac.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/apac.c b/libavcodec/apac.c
index f740fb5553..068ad09530 100644
--- a/libavcodec/apac.c
+++ b/libavcodec/apac.c
@@ -159,6 +159,7 @@ static int apac_decode(AVCodecContext *avctx, AVFrame *frame,
buf = &s->bitstream[s->bitstream_index];
buf_size += s->bitstream_size;
s->bitstream_size = buf_size;
+ memset(buf + buf_size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
frame->nb_samples = s->bitstream_size * 16 * 8;
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
More information about the ffmpeg-cvslog
mailing list