[FFmpeg-cvslog] avformat/mov: do not ignore errors in mov_metadata_hmmt()

Michael Niedermayer git at videolan.org
Wed Sep 8 22:43:15 EEST 2021


ffmpeg | branch: release/4.4 | Michael Niedermayer <michael at niedermayer.cc> | Sun Jul 11 14:27:22 2021 +0200| [5334967a56891ad4bd1c490dd4b1a17493b9e81e] | committer: Michael Niedermayer

avformat/mov: do not ignore errors in mov_metadata_hmmt()

Fixes: Timeout
Fixes: 35637/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6311060272447488

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

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

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

diff --git a/libavformat/mov.c b/libavformat/mov.c
index d6427b3574..0f5a961c2e 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -294,6 +294,8 @@ static int mov_metadata_hmmt(MOVContext *c, AVIOContext *pb, unsigned len)
         int moment_time = avio_rb32(pb);
         avpriv_new_chapter(c->fc, i, av_make_q(1, 1000), moment_time, AV_NOPTS_VALUE, NULL);
     }
+    if (avio_feof(pb))
+        return AVERROR_INVALIDDATA;
     return 0;
 }
 



More information about the ffmpeg-cvslog mailing list