[FFmpeg-cvslog] avformat/mov: Check avif_info

Michael Niedermayer git at videolan.org
Sat Sep 30 00:13:51 EEST 2023


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Thu Sep 21 20:09:12 2023 +0200| [9a3bbf89bd9b32b9849d34920f7afcbd861d4e6b] | committer: Michael Niedermayer

avformat/mov: Check avif_info

Fixes: leak
Fixes: 45982/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6674082962997248
Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6674082962997248

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

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

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 1996e0028c..294c864fbd 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -7772,10 +7772,11 @@ static int mov_read_iloc(MOVContext *c, AVIOContext *pb, MOVAtom atom)
         return 0;
     }
 
-    if (c->fc->nb_streams) {
+    if (c->avif_info) {
         av_log(c->fc, AV_LOG_INFO, "Duplicate iloc box found\n");
         return 0;
     }
+    av_assert0(!c->fc->nb_streams);
 
     version = avio_r8(pb);
     avio_rb24(pb);  // flags.



More information about the ffmpeg-cvslog mailing list