Skip to content
Snippets Groups Projects
Commit e7cb1615 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

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: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 5880d788
No related branches found
No related tags found
No related merge requests found
...@@ -278,6 +278,9 @@ static int ape_read_header(AVFormatContext * s) ...@@ -278,6 +278,9 @@ static int ape_read_header(AVFormatContext * s)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
for (i = 0; i < ape->seektablelength / sizeof(uint32_t); i++) for (i = 0; i < ape->seektablelength / sizeof(uint32_t); i++)
ape->seektable[i] = avio_rl32(pb); ape->seektable[i] = avio_rl32(pb);
}else{
av_log(s, AV_LOG_ERROR, "Missing seektable\n");
return -1;
} }
ape->frames[0].pos = ape->firstframe; ape->frames[0].pos = ape->firstframe;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment