[FFmpeg-cvslog] ape: Fix null ptr dereference with files missing a seekatable.
Michael Niedermayer
git at videolan.org
Sat Jun 9 21:05:14 CEST 2012
ffmpeg | branch: release/0.10 | Michael Niedermayer <michaelni at gmx.at> | Tue May 29 19:50:15 2012 +0200| [0452ebfd4b97a60baf1211e8ac217ad501f7a149] | committer: Michael Niedermayer
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 at gmx.at>
(cherry picked from commit e7cb161515fc9fb6d30d1681d64d9ba7ad737a4e)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0452ebfd4b97a60baf1211e8ac217ad501f7a149
---
libavformat/ape.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/ape.c b/libavformat/ape.c
index 72fca5d..016638b 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;
More information about the ffmpeg-cvslog
mailing list