[FFmpeg-cvslog] avformat/mov: Check for duplicate mdcv
Michael Niedermayer
git at videolan.org
Fri Jun 18 22:15:06 EEST 2021
ffmpeg | branch: release/4.4 | Michael Niedermayer <michael at niedermayer.cc> | Tue Jun 8 18:14:21 2021 +0200| [7af1a73711040b31f567a104dcb7d6c7b17abec7] | committer: Michael Niedermayer
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 at niedermayer.cc>
(cherry picked from commit f54d85cee64b98bca5d2bee703f2a266ea75dce7)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7af1a73711040b31f567a104dcb7d6c7b17abec7
---
libavformat/mov.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}
More information about the ffmpeg-cvslog
mailing list