diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-09-13 23:04:13 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-10-06 14:41:42 +0200 |
commit | bd947157eb904222056103ea6bcd6d204edf45d8 (patch) | |
tree | 286f6dde42bdb70a27b2efd0ef2870c63f80334e | |
parent | b9c0ba3939dd9182f7b2e425feeff10143343c86 (diff) | |
download | ffmpeg-bd947157eb904222056103ea6bcd6d204edf45d8.tar.gz |
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@niedermayer.cc>
(cherry picked from commit 9a222f140e2674ac936b2f41c480487bc666dd95)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/mov.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 6de3ab9a68..fa720bbb34 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -5512,6 +5512,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); |