[FFmpeg-cvslog] avcodec/shorten: clear padding
Michael Niedermayer
git at videolan.org
Thu Feb 27 19:06:58 EET 2025
ffmpeg | branch: release/4.3 | Michael Niedermayer <michael at niedermayer.cc> | Sun Aug 4 22:10:48 2024 +0200| [a3431f279e7c83cf272e5ecb916a0734fe715241] | committer: Michael Niedermayer
avcodec/shorten: clear padding
Fixes: use-of-uninitialized-value
Fixes: 70854/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SHORTEN_fuzzer-5533480570650624
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit e44349ee88418ac16051bbc9231c1bfdc25d3504)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a3431f279e7c83cf272e5ecb916a0734fe715241
---
libavcodec/shorten.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index 4134af74cf..762bca0df3 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -558,6 +558,7 @@ static int shorten_decode_frame(AVCodecContext *avctx, void *data,
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);
/* do not decode until buffer has at least max_framesize bytes or
* the end of the file has been reached */
More information about the ffmpeg-cvslog
mailing list