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')) {