[FFmpeg-cvslog] avformat/mvdec: Check if name was fully read

Michael Niedermayer git at videolan.org
Fri May 16 20:57:21 EEST 2025


ffmpeg | branch: release/4.2 | Michael Niedermayer <michael at niedermayer.cc> | Thu Aug 15 00:37:05 2024 +0200| [e7a715ff2b8ec56ca31eea9d2b8069d20e9e47db] | committer: Michael Niedermayer

avformat/mvdec: Check if name was fully read

Fixes: use of uninitialized value
Fixes: 70901/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-6341913949569024

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 4e39795c75e664ef06f17473adec8c75fcf9de6f)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavformat/mvdec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/mvdec.c b/libavformat/mvdec.c
index bdb53ef63f..586d4520d7 100644
--- a/libavformat/mvdec.c
+++ b/libavformat/mvdec.c
@@ -247,7 +247,8 @@ static int read_table(AVFormatContext *avctx, AVStream *st,
         if (avio_feof(pb))
             return AVERROR_EOF;
 
-        avio_read(pb, name, 16);
+        if (avio_read(pb, name, 16) != 16)
+            return AVERROR_INVALIDDATA;
         name[sizeof(name) - 1] = 0;
         size = avio_rb32(pb);
         if (size < 0) {



More information about the ffmpeg-cvslog mailing list