1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-03 05:10:03 +02:00

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 9a222f140e)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2021-09-13 23:04:13 +02:00
parent e075bc192d
commit 65d6de52f1

View File

@ -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);