diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-04-02 03:51:44 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-04-02 03:54:27 +0400 |
commit | 4defa68fe25eae4d7c27341e3b35811c047dcd3f (patch) | |
tree | 9d4d37343ec4c99801c1b76b813b0a5b2b04576b /libavformat/ape.c | |
parent | a2f5e14a867768019b49b830e29801f1bfb2abb7 (diff) | |
parent | aa05f2126e18d23432bde77e6f44e41691472fef (diff) |
Merge remote branch 'qatar/master'
* qatar/master:
ac3enc: ARM optimised ac3_compute_matissa_size
ac3: armv6 optimised bit_alloc_calc_bap
fate: simplify fft test rules
avio: document avio_alloc_context.
lavf: make compute_chapters_end less picky.
sierravmd: fix Indeo3 videos
FFT: simplify fft8()
fate: add fixed-point fft/mdct tests
Fixed-point support in fft-test
ape: check that number of seektable entries is equal to number of frames
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/ape.c')
-rw-r--r-- | libavformat/ape.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/ape.c b/libavformat/ape.c index eb10f4538c..28b80b25aa 100644 --- a/libavformat/ape.c +++ b/libavformat/ape.c @@ -250,6 +250,11 @@ static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap) av_log(s, AV_LOG_ERROR, "Too many frames: %d\n", ape->totalframes); return -1; } + if (ape->seektablelength && (ape->seektablelength / sizeof(*ape->seektable)) < ape->totalframes) { + av_log(s, AV_LOG_ERROR, "Number of seek entries is less than number of frames: %d vs. %d\n", + ape->seektablelength / sizeof(*ape->seektable), ape->totalframes); + return AVERROR_INVALIDDATA; + } ape->frames = av_malloc(ape->totalframes * sizeof(APEFrame)); if(!ape->frames) return AVERROR(ENOMEM); |