[FFmpeg-cvslog] avformat/mxg: clear AV_INPUT_BUFFER_PADDING_SIZE

Michael Niedermayer git at videolan.org
Mon Aug 4 23:57:37 EEST 2025


ffmpeg | branch: release/7.0 | Michael Niedermayer <michael at niedermayer.cc> | Thu Jul 24 01:05:40 2025 +0200| [cfcafeba2364035e0952e3cb05a730d3f32af1a6] | committer: Michael Niedermayer

avformat/mxg: clear AV_INPUT_BUFFER_PADDING_SIZE

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>
(cherry picked from commit 1b12e919cfe3bf69038225794330d14575fb78d0)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavformat/mxg.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/mxg.c b/libavformat/mxg.c
index 23d72ad23b..30fa0c2398 100644
--- a/libavformat/mxg.c
+++ b/libavformat/mxg.c
@@ -126,6 +126,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;
 }
 



More information about the ffmpeg-cvslog mailing list