Module: libav Branch: release/0.7 Commit: 4ee014309c377f7cfaa9578a393864ae500136f6
Author: Laurent Aimar <[email protected]> Committer: Reinhard Tartler <[email protected]> Date: Sun Sep 11 19:17:40 2011 +0200 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]> --- libavformat/ape.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/libavformat/ape.c b/libavformat/ape.c index 90b0261..b084100 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); } _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
