[FFmpeg-devel] [PATCH 3/3] avformat/mxg: clear AV_INPUT_BUFFER_PADDING_SIZE
Michael Niedermayer
michael at niedermayer.cc
Thu Jul 24 19:40:19 EEST 2025
Fixes: use of uninitialized memory
Fixes: 427532813/clusterfuzz-testcase-minimized-ffmpeg_dem_MXG_fuzzer-5661938917113856
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavformat/mxg.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/mxg.c b/libavformat/mxg.c
index 6a39873f213..40139d7d3d9 100644
--- a/libavformat/mxg.c
+++ b/libavformat/mxg.c
@@ -127,6 +127,8 @@ static int mxg_update_cache(AVFormatContext *s, unsigned int cache_size)
mxg->cache_size += ret;
+ memset(mxg->buffer_ptr + mxg->cache_size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
+
return ret;
}
--
2.50.1
More information about the ffmpeg-devel
mailing list