aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-01-31 16:28:08 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2021-02-20 14:21:24 +0100
commit6112b1b6e444bbeb6a683b0893a41091492e146c (patch)
tree9c66a0580da1d8db389be2c2a3254d25f5cd2ce4 /libavformat/mov.c
parentff6a6b94174ecda019d6cbeb07cdce4891db38dd (diff)
downloadffmpeg-6112b1b6e444bbeb6a683b0893a41091492e146c.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>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 5852355285..697b6908d1 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -5518,6 +5518,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);