diff --git a/libavformat/mov.c b/libavformat/mov.c index 3ead74bb4b..e6d4e360cd 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -4054,6 +4054,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')) {