mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-23 02:11:14 +08:00
ape demuxer: fix segfault on memory allocation failure.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 273aab99bf)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
committed by
Michael Niedermayer
parent
ecd6fa11c2
commit
19431d4d4e
@@ -356,6 +356,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] = get_le32(pb);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user