aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-09-13 23:04:13 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-10-06 11:44:12 +0200
commitecb7f15b7bd2bc4902a9ca98084624472aedbd1d (patch)
treeb7ab3906803e83acc96c691004640e5737a58570
parentf997f890716cc5b965545a10eebaaecfcf82e9d5 (diff)
downloadffmpeg-ecb7f15b7bd2bc4902a9ca98084624472aedbd1d.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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 348c648d60..5d1e29c429 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -5453,6 +5453,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);