[FFmpeg-cvslog] avformat/mov: Disallow duplicate smdm
Michael Niedermayer
git at videolan.org
Wed Apr 6 22:55:15 EEST 2022
ffmpeg | branch: release/4.3 | Michael Niedermayer <michael at niedermayer.cc> | Fri Dec 3 17:42:22 2021 +0100| [58368cc528cd82020be530694c2d8747b73b13f6] | committer: Michael Niedermayer
avformat/mov: Disallow duplicate smdm
Fixes: memleak
Fixes: 39879/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5327819907923968
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 b5ba74053c1ef9f38d9e7b3a036675f06d2b2714)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=58368cc528cd82020be530694c2d8747b73b13f6
---
libavformat/mov.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 309b813ba3..07bbebab0e 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -5406,6 +5406,9 @@ static int mov_read_smdm(MOVContext *c, AVIOContext *pb, MOVAtom atom)
av_log(c->fc, AV_LOG_WARNING, "Unsupported Mastering Display Metadata box version %d\n", version);
return 0;
}
+ if (sc->mastering)
+ return AVERROR_INVALIDDATA;
+
avio_skip(pb, 3); /* flags */
sc->mastering = av_mastering_display_metadata_alloc();
More information about the ffmpeg-cvslog
mailing list