diff --git a/libavformat/mov.c b/libavformat/mov.c index e7673d9469..2c47610d0e 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -8202,6 +8202,8 @@ static int mov_read_iinf(MOVContext *c, AVIOContext *pb, MOVAtom atom) for (i = 0; i < entry_count; i++) { MOVAtom infe; + if (avio_feof(pb)) + return AVERROR_INVALIDDATA; infe.size = avio_rb32(pb) - 8; infe.type = avio_rl32(pb); ret = mov_read_infe(c, pb, infe, i);