Commit e0941f6abb for ffmpeg
commit e0941f6abba868eff5cdad37eef422342c520e63
Author: Michael Niedermayer <michael@niedermayer.cc>
Date: Tue Oct 6 06:50:59 2026 +0200
avformat/mxg: Fail on truncated marker segments
The fix is the one recommended in the report.
Fixes: use of uninitialized memory
Fixes: 544YKgP8DNSj
Fixes: AISLE-2026-0111-00027
Use of uninitialized memory Replicated through UnModified FFmpeg with Valgrind
Found-by: Joshua Rogers <joshua.rogers@aisle.com>
diff --git a/libavformat/mxg.c b/libavformat/mxg.c
index 40139d7d3d..5595d7d270 100644
--- a/libavformat/mxg.c
+++ b/libavformat/mxg.c
@@ -203,6 +203,8 @@ static int mxg_read_packet(AVFormatContext *s, AVPacket *pkt)
ret = mxg_update_cache(s, size);
if (ret < 0)
return ret;
+ if (mxg->cache_size < size)
+ return AVERROR_EOF;
startmarker_ptr = mxg->buffer_ptr - 2;
mxg->cache_size = 0;
} else {