aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/ape.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-07 13:49:23 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-07 13:49:23 +0200
commitdfe0ba46bf484b8b64cd7584353e97ea18912c13 (patch)
treeac8cc77b066b6d6e484632101670e2a75af54a0f /libavformat/ape.c
parent6bfa823b70ec135b59e036106eb403a546145faa (diff)
parentaade60ab165716523788cd11caf03ae61b40144a (diff)
downloadffmpeg-dfe0ba46bf484b8b64cd7584353e97ea18912c13.tar.gz
Merge commit 'aade60ab165716523788cd11caf03ae61b40144a' into release/1.1
* commit 'aade60ab165716523788cd11caf03ae61b40144a': matroskadec: Check that .lang was allocated and set before reading it alac: Limit max_samples_per_frame ape demuxer: check for EOF in potentially long loops 4xm: check that bits per sample is strictly positive lavf: avoid integer overflow when estimating bitrate pictordec: pass correct context to avpriv_request_sample Conflicts: libavcodec/pictordec.c libavformat/matroskadec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/ape.c')
-rw-r--r--libavformat/ape.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/ape.c b/libavformat/ape.c
index 551513d3d1..58f2418ce7 100644
--- a/libavformat/ape.c
+++ b/libavformat/ape.c
@@ -274,7 +274,9 @@ static int ape_read_header(AVFormatContext * s)
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) && !pb->eof_reached;
+ i++)
ape->seektable[i] = avio_rl32(pb);
}else{
av_log(s, AV_LOG_ERROR, "Missing seektable\n");