diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-05-29 19:50:15 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-29 19:56:07 +0200 |
commit | e7cb161515fc9fb6d30d1681d64d9ba7ad737a4e (patch) | |
tree | 9eeabdc905fee8e93394050ceb4e07b080044a78 | |
parent | 5880d788734d9c4e2dc53c6cdec343ee978d3a3f (diff) | |
download | ffmpeg-e7cb161515fc9fb6d30d1681d64d9ba7ad737a4e.tar.gz |
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>
-rw-r--r-- | libavformat/ape.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/ape.c b/libavformat/ape.c index 640a7f699b..fff85c4edb 100644 --- a/libavformat/ape.c +++ b/libavformat/ape.c @@ -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; |