diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-10-25 20:39:45 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-09-10 17:04:26 +0300 |
commit | eb43e14f8cf63e118ac07d9fb325ceb94d3458e6 (patch) | |
tree | 6c0569629082efefb5852076d35f4c6cf5546e9b /libavformat/mov.c | |
parent | 781f4fc4480626d654e53eebaca85797e9fd5889 (diff) |
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>
(cherry picked from commit 0afbaabdca2730d3f8d88719d64802d50b92d351)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index a9e63e4b40..e654e351e0 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -6827,6 +6827,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')) { |