aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-10-25 18:39:45 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2020-12-19 20:07:56 +0100
commit0afbaabdca2730d3f8d88719d64802d50b92d351 (patch)
tree58a1f62431af16ae9cd999e22684e4b2b1ce88d6 /libavformat/mov.c
parentad20a4f92bd93449f94f6185fa17f553b9db4117 (diff)
downloadffmpeg-0afbaabdca2730d3f8d88719d64802d50b92d351.tar.gz
avformat/mov: Check if hoov is at the end
Fixes: Timeout, probably infinite loop Fixes: 26559/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5391165484171264 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 710a15dea8..c6a2d9c388 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -7006,6 +7006,8 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom)
uint32_t type;
avio_skip(pb, 4);
type = avio_rl32(pb);
+ if (avio_feof(pb))
+ break;
avio_seek(pb, -8, SEEK_CUR);
if (type == MKTAG('m','v','h','d') ||
type == MKTAG('c','m','o','v')) {