1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avformat/mov: Ignore duplicate CoLL

Fixes: memleak
Fixes: 32146/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5377612845285376

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-04-19 13:37:26 +02:00
parent 299a56c900
commit 9548dc74d8

View File

@ -5444,6 +5444,11 @@ static int mov_read_coll(MOVContext *c, AVIOContext *pb, MOVAtom atom)
}
avio_skip(pb, 3); /* flags */
if (sc->coll){
av_log(c->fc, AV_LOG_WARNING, "Ignoring duplicate COLL\n");
return 0;
}
sc->coll = av_content_light_metadata_alloc(&sc->coll_size);
if (!sc->coll)
return AVERROR(ENOMEM);