diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-01-31 18:28:08 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-09-10 17:04:26 +0300 |
commit | 5dafc1edca45632243a49a3b7330384fdc53326a (patch) | |
tree | c6758c2bf7058619afc950dd7846321d1abc97ce /libavformat/mov.c | |
parent | 2b79229316d2804ef8d4d98ece0a8c3870a51b3b (diff) |
avformat/mov: Check for duplicate st3d
Fixes: memleak
Fixes: 29585/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6594188688490496
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 658f0606cba0f866714cbe09af30ec40c4168930)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 5173e393b1..38504e5251 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -5459,6 +5459,10 @@ static int mov_read_st3d(MOVContext *c, AVIOContext *pb, MOVAtom atom) av_log(c->fc, AV_LOG_ERROR, "Empty stereoscopic video box\n"); return AVERROR_INVALIDDATA; } + + if (sc->stereo3d) + return AVERROR_INVALIDDATA; + avio_skip(pb, 4); /* version + flags */ mode = avio_r8(pb); |