Commit c2c31615 authored by Justin Ruggles's avatar Justin Ruggles

ape: stop reading after the last frame has been read

This avoids buffer overread when the last packet size estimate is too small.
parent 66f7be36
......@@ -358,7 +358,7 @@ static int ape_read_packet(AVFormatContext * s, AVPacket * pkt)
if (s->pb->eof_reached)
return AVERROR_EOF;
if (ape->currentframe > ape->totalframes)
if (ape->currentframe >= ape->totalframes)
return AVERROR_EOF;
if (avio_seek(s->pb, ape->frames[ape->currentframe].pos, SEEK_SET) < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment