mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
Fixed segfault on memory allocation failure in ape demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
c8ce2b0a1d
commit
1632a576e6
@ -273,6 +273,8 @@ static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap)
|
|||||||
|
|
||||||
if (ape->seektablelength > 0) {
|
if (ape->seektablelength > 0) {
|
||||||
ape->seektable = av_malloc(ape->seektablelength);
|
ape->seektable = av_malloc(ape->seektablelength);
|
||||||
|
if (!ape->seektable)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
for (i = 0; i < ape->seektablelength / sizeof(uint32_t); i++)
|
for (i = 0; i < ape->seektablelength / sizeof(uint32_t); i++)
|
||||||
ape->seektable[i] = avio_rl32(pb);
|
ape->seektable[i] = avio_rl32(pb);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user