[FFmpeg-cvslog] Fixed segfault on memory allocation failure in ape demuxer.
Laurent Aimar
git at videolan.org
Wed Sep 21 21:08:33 CEST 2011
ffmpeg | branch: release/0.8 | Laurent Aimar <fenrir at videolan.org> | Sun Sep 11 19:17:40 2011 +0200| [4601765ee8fa4930cc3210307c5689911f3ddeba] | committer: Michael Niedermayer
Fixed segfault on memory allocation failure in ape demuxer.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 1632a576e68c27229b31f0d1203ff90220e0e024)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4601765ee8fa4930cc3210307c5689911f3ddeba
---
libavformat/ape.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libavformat/ape.c b/libavformat/ape.c
index bda6b32..b0f2394 100644
--- a/libavformat/ape.c
+++ b/libavformat/ape.c
@@ -270,6 +270,8 @@ static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap)
if (ape->seektablelength > 0) {
ape->seektable = av_malloc(ape->seektablelength);
+ if (!ape->seektable)
+ return AVERROR(ENOMEM);
for (i = 0; i < ape->seektablelength / sizeof(uint32_t); i++)
ape->seektable[i] = avio_rl32(pb);
}
More information about the ffmpeg-cvslog
mailing list