ffmpeg | branch: release/4.4 | Michael Niedermayer <mich...@niedermayer.cc> | 
Wed Nov  8 01:37:11 2023 +0100| [e4a5949d52db35f9a728a5d6a9fd1e962171d1e8] | 
committer: Michael Niedermayer

avformat/mov: Disallow FTYP after streams

Fixes: Assertion !c->fc->nb_streams failed at libavformat/mov.c:7799
Fixes: 
63875/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5479178702815232

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>
(cherry picked from commit 19fcf4313148e86aa47d81a8d5d5e8d056f1f906)
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>

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

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

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 13035c48ed..539eec0eef 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1134,6 +1134,8 @@ static int mov_read_ftyp(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
     int ret = ffio_read_size(pb, type, 4);
     if (ret < 0)
         return ret;
+    if (c->fc->nb_streams)
+        return AVERROR_INVALIDDATA;
 
     if (strcmp(type, "qt  "))
         c->isom = 1;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to