aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-06-08 18:14:21 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-06-18 20:53:56 +0200
commit7af1a73711040b31f567a104dcb7d6c7b17abec7 (patch)
tree532fb9d4b86c51d2337b736bda79d6cc19be5451
parent79b69b5f4c7f4577972d1dd3accd736b48c91969 (diff)
downloadffmpeg-7af1a73711040b31f567a104dcb7d6c7b17abec7.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>
-rw-r--r--libavformat/mov.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 6c5caa7d04..d6427b3574 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -5468,7 +5468,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;
}