[FFmpeg-devel] [PATCH 3/5] avformat/mov: Better check for duplicate iloc

Michael Niedermayer michael at niedermayer.cc
Mon Apr 17 01:25:16 EEST 2023


Fixes: memleak
Fixes: 45982/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>
---
 libavformat/mov.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 057fd872b10..6853bb324cf 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -7777,7 +7777,7 @@ static int mov_read_iloc(MOVContext *c, AVIOContext *pb, MOVAtom atom)
         return 0;
     }
 
-    if (c->fc->nb_streams) {
+    if (c->fc->nb_streams || c->avif_info) {
         av_log(c->fc, AV_LOG_INFO, "Duplicate iloc box found\n");
         return 0;
     }
-- 
2.17.1



More information about the ffmpeg-devel mailing list