diff --git a/libavformat/ifv.c b/libavformat/ifv.c index 6acbb29a75..f95e9b0e52 100644 --- a/libavformat/ifv.c +++ b/libavformat/ifv.c @@ -68,6 +68,8 @@ static int read_index(AVFormatContext *s, } for (i = start_index; i < end_index; i++) { + if (avio_feof(s->pb)) + return AVERROR_EOF; pos = avio_rl32(s->pb); size = avio_rl32(s->pb);