[FFmpeg-cvslog] avformat/mov: Ignore duplicate CoLL

Michael Niedermayer git at videolan.org
Fri Jun 18 22:14:14 EEST 2021


ffmpeg | branch: release/4.4 | Michael Niedermayer <michael at niedermayer.cc> | Mon Apr 19 13:37:26 2021 +0200| [6f7a7b5ffbde6202854a444cbc55302faa7ec1cc] | committer: Michael Niedermayer

avformat/mov: Ignore duplicate CoLL

Fixes: memleak
Fixes: 32146/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5377612845285376

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

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

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

diff --git a/libavformat/mov.c b/libavformat/mov.c
index e6c2dca0ba..6c5caa7d04 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -5516,6 +5516,11 @@ static int mov_read_coll(MOVContext *c, AVIOContext *pb, MOVAtom atom)
     }
     avio_skip(pb, 3); /* flags */
 
+    if (sc->coll){
+        av_log(c->fc, AV_LOG_WARNING, "Ignoring duplicate COLL\n");
+        return 0;
+    }
+
     sc->coll = av_content_light_metadata_alloc(&sc->coll_size);
     if (!sc->coll)
         return AVERROR(ENOMEM);



More information about the ffmpeg-cvslog mailing list