diff options
author | Laurent Aimar <[email protected]> | 2011-09-11 19:17:40 +0200 |
---|---|---|
committer | Anton Khirnov <[email protected]> | 2011-09-13 17:25:41 +0200 |
commit | 1486e99b9039f380619f7eb516a5503ad3ad04c8 (patch) | |
tree | bab80c83f72b61ee77eac20ad4d2bbaf371537d4 | |
parent | dc6ee1836392b6046cc3314a7fa8c58473318890 (diff) |
ape demuxer: fix segfault on memory allocation failure.
Signed-off-by: Anton Khirnov <[email protected]>
(cherry picked from commit 273aab99bf7be2bcda95dd64101c2317ee0fcb99)
Signed-off-by: Anton Khirnov <[email protected]>
-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 90b02619e0..b0841002a2 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); } |