Browse Source

ape demuxer: fix segfault on memory allocation failure.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
tags/n0.9
Laurent Aimar Anton Khirnov 13 years ago
parent
commit
273aab99bf
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/ape.c

+ 2
- 0
libavformat/ape.c View File

@@ -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);
}


Loading…
Cancel
Save