aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-09-13 23:04:13 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-10-05 23:19:39 +0200
commit65d6de52f12875475399a601d0a9ffbc51b32bda (patch)
tree13e5497fa408d865b786fef76ff8e2640f2ec33c /libavformat
parente075bc192da554b252a4a7d22c159a307724ee83 (diff)
downloadffmpeg-65d6de52f12875475399a601d0a9ffbc51b32bda.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>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mov.c5
1 files changed, 5 insertions, 0 deletions
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);