aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-29 19:50:15 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-06-09 20:40:50 +0200
commit0452ebfd4b97a60baf1211e8ac217ad501f7a149 (patch)
treee3268ebe8e18013196afcd1f61203d49edbf9fb9
parent9e9e6bbe7b79cf7bb628b7f32321b9509ecb3cba (diff)
downloadffmpeg-0452ebfd4b97a60baf1211e8ac217ad501f7a149.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> (cherry picked from commit e7cb161515fc9fb6d30d1681d64d9ba7ad737a4e) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/ape.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/ape.c b/libavformat/ape.c
index 72fca5dd46..016638b54e 100644
--- a/libavformat/ape.c
+++ b/libavformat/ape.c
@@ -278,6 +278,9 @@ static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap)
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;