Commit 273aab99 authored by Laurent Aimar's avatar Laurent Aimar Committed by Anton Khirnov

ape demuxer: fix segfault on memory allocation failure.

Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent 0872bb23
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment