diff options
author | Laurent Aimar <fenrir@videolan.org> | 2011-09-11 19:17:40 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-21 18:02:25 +0200 |
commit | 4601765ee8fa4930cc3210307c5689911f3ddeba (patch) | |
tree | 5c03d1bdd1f777df7ab3a82302b7f1be1da61874 | |
parent | 54544100a3ad24a81275f013f278e7f41f1229f7 (diff) | |
download | ffmpeg-4601765ee8fa4930cc3210307c5689911f3ddeba.tar.gz |
Fixed segfault on memory allocation failure in ape demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1632a576e68c27229b31f0d1203ff90220e0e024)
-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 bda6b32b1d..b0f2394ad8 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); } |