On 2/4/12, Justin Ruggles <[email protected]> wrote:
> This avoids buffer overread when the last packet size estimate is too small.
> ---
>  libavformat/ape.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/libavformat/ape.c b/libavformat/ape.c
> index 853fdca..c650a54 100644
> --- a/libavformat/ape.c
> +++ b/libavformat/ape.c
> @@ -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)

OK if tested.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to