summaryrefslogtreecommitdiff
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-09-13 23:04:13 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-09-14 17:34:33 +0200
commit9a222f140e2674ac936b2f41c480487bc666dd95 (patch)
tree3051f508f3eeb1d3e7cb7d5bac0d3f96184804a7 /libavformat/mov.c
parent8f4c36553c068faafdaa3af8198da9c2b379b3e8 (diff)
downloadffmpeg-9a222f140e2674ac936b2f41c480487bc666dd95.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>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index c5583e07c7..4bc42d6b20 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -5485,6 +5485,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);