diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-01-31 16:28:08 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-09-11 21:23:49 +0200 |
commit | 58b0d89f959ef4016000ba8582212e638b667756 (patch) | |
tree | 715b025180a6fa2f1379db43d63ab307a5cc4502 | |
parent | 69fc4a7cae8da3734185ccede0a17ab2f4371195 (diff) | |
download | ffmpeg-58b0d89f959ef4016000ba8582212e638b667756.tar.gz |
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>
-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 436acd9fae..38d44b72db 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -4904,6 +4904,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); |