ape: stop reading after the last frame has been read
This avoids buffer overread when the last packet size estimate is too small.
This commit is contained in:
parent
66f7be3603
commit
c2c316158f
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user