[FFmpeg-cvslog] avformat/mov: Check for duplicate clli

Michael Niedermayer git at videolan.org
Wed Oct 6 19:07:29 EEST 2021


ffmpeg | branch: release/4.4 | Michael Niedermayer <michael at niedermayer.cc> | Mon Sep 13 23:04:13 2021 +0200| [65d6de52f12875475399a601d0a9ffbc51b32bda] | committer: Michael Niedermayer

avformat/mov: Check for duplicate clli

Fixes: memleak
Fixes: 35261/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-4869656287510528

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

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

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

diff --git a/libavformat/mov.c b/libavformat/mov.c
index a7a31dada1..04dda63212 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -5553,6 +5553,11 @@ static int mov_read_clli(MOVContext *c, AVIOContext *pb, MOVAtom atom)
         return AVERROR_INVALIDDATA;
     }
 
+    if (sc->coll){
+        av_log(c->fc, AV_LOG_WARNING, "Ignoring duplicate CLLI/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