ape demuxer: fix segfault on memory allocation failure.
Signed-off-by: Anton Khirnov <anton@khirnov.net> (cherry picked from commit 273aab99bf7be2bcda95dd64101c2317ee0fcb99) Signed-off-by: Anton Khirnov <anton@khirnov.net> (cherry picked from commit 4ee014309c377f7cfaa9578a393864ae500136f6) Signed-off-by: Reinhard Tartler <siretart@tauware.de>
This commit is contained in:
parent
a97e82c487
commit
4492523938
@ -263,6 +263,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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user