diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-06-08 18:14:21 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-09-09 13:54:52 +0200 |
commit | c9b39340f954de5c6d42c2a4c61fe1fe2857f95e (patch) | |
tree | 504ea89b6ebd63494681bdcba203078e2a905137 /libavformat | |
parent | 5498836d7da25342b0595e4908a529d169a22fb9 (diff) | |
download | ffmpeg-c9b39340f954de5c6d42c2a4c61fe1fe2857f95e.tar.gz |
avformat/mov: Check for duplicate mdcv
Fixes: memleak
Fixes: 34932/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5456227658235904
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 f54d85cee64b98bca5d2bee703f2a266ea75dce7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mov.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 0f991cbb42..f48ed602f5 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -5374,7 +5374,7 @@ static int mov_read_mdcv(MOVContext *c, AVIOContext *pb, MOVAtom atom) sc = c->fc->streams[c->fc->nb_streams - 1]->priv_data; - if (atom.size < 24) { + if (atom.size < 24 || sc->mastering) { av_log(c->fc, AV_LOG_ERROR, "Invalid Mastering Display Color Volume box\n"); return AVERROR_INVALIDDATA; } |