diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-25 22:54:54 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-25 22:55:03 +0200 |
commit | 3308b443f9342cd597a9d7440d2315f0a65b1566 (patch) | |
tree | 8fcd08caf65c6256e60d1b1ed15ca317304f4ad2 /libavcodec/indeo4.c | |
parent | 91ad27e8f5fb931eb2e6d810d4090e570ff5c3a7 (diff) | |
parent | e2dcb8208e8f6cffef58a85127765047f5ef8868 (diff) | |
download | ffmpeg-3308b443f9342cd597a9d7440d2315f0a65b1566.tar.gz |
Merge commit 'e2dcb8208e8f6cffef58a85127765047f5ef8868' into release/0.10
* commit 'e2dcb8208e8f6cffef58a85127765047f5ef8868':
indeo5: return proper error codes
indeo4: Validate scantable dimension
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/indeo4.c')
-rw-r--r-- | libavcodec/indeo4.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c index 0c1d50ff2e..b15e250cfe 100644 --- a/libavcodec/indeo4.c +++ b/libavcodec/indeo4.c @@ -354,6 +354,12 @@ static int decode_band_hdr(IVI45DecContext *ctx, IVIBandDesc *band, av_log(avctx, AV_LOG_ERROR, "Custom scan pattern encountered!\n"); return AVERROR_INVALIDDATA; } + if (scan_indx > 4 && scan_indx < 10) { + if (band->blk_size != 4) + return AVERROR_INVALIDDATA; + } else if (band->blk_size != 8) + return AVERROR_INVALIDDATA; + band->scan = scan_index_to_tab[scan_indx]; band->quant_mat = get_bits(&ctx->gb, 5); |