diff options
author | Laurent Aimar <fenrir@videolan.org> | 2011-09-11 19:17:40 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-11 21:19:45 +0200 |
commit | 1632a576e68c27229b31f0d1203ff90220e0e024 (patch) | |
tree | 346831a3b4218c1c5349b13a941326b7e6efe171 | |
parent | c8ce2b0a1dce4f07b74c4686682bf72dbd307290 (diff) | |
download | ffmpeg-1632a576e68c27229b31f0d1203ff90220e0e024.tar.gz |
Fixed segfault on memory allocation failure in ape demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/ape.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/ape.c b/libavformat/ape.c index 61590bdd35..cfac93381c 100644 --- a/libavformat/ape.c +++ b/libavformat/ape.c @@ -273,6 +273,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); } |