mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 08:42:39 +00:00
ape: Fix null ptr dereference with files missing a seekatable.
Such files are currently not supported as the table is used at several points Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
5880d78873
commit
e7cb161515
@ -278,6 +278,9 @@ static int ape_read_header(AVFormatContext * s)
|
||||
return AVERROR(ENOMEM);
|
||||
for (i = 0; i < ape->seektablelength / sizeof(uint32_t); i++)
|
||||
ape->seektable[i] = avio_rl32(pb);
|
||||
}else{
|
||||
av_log(s, AV_LOG_ERROR, "Missing seektable\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
ape->frames[0].pos = ape->firstframe;
|
||||
|
Loading…
Reference in New Issue
Block a user