ape demuxer: check for EOF in potentially long loops
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry-picked from commit 488b2984fe)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
parent
f3c7e604fa
commit
9486e98712
1 changed files with 3 additions and 1 deletions
|
|
@ -276,7 +276,9 @@ static int ape_read_header(AVFormatContext * s)
|
|||
ape->seektable = av_malloc(ape->seektablelength);
|
||||
if (!ape->seektable)
|
||||
return AVERROR(ENOMEM);
|
||||
for (i = 0; i < ape->seektablelength / sizeof(uint32_t); i++)
|
||||
for (i = 0;
|
||||
i < ape->seektablelength / sizeof(uint32_t) && !pb->eof_reached;
|
||||
i++)
|
||||
ape->seektable[i] = avio_rl32(pb);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue