1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +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>
This commit is contained in:
Michael Niedermayer 2021-09-13 23:04:13 +02:00
parent 8f4c36553c
commit 9a222f140e

View File

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