diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-26 03:17:19 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-26 03:18:49 +0100 |
commit | 66daebc9d50d8095bb067138168e57b6a1880a19 (patch) | |
tree | 0c5579c97e6cfd231399348abadc116e3bcaf73e /libavcodec/indeo4.c | |
parent | cfc7b9cfff651881ee423832c4329fbd8719045c (diff) | |
download | ffmpeg-66daebc9d50d8095bb067138168e57b6a1880a19.tar.gz |
indeo4: check for invalid transform_size blk_size combinations
The checks existing previously where not sufficient
Fixes out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/indeo4.c')
-rw-r--r-- | libavcodec/indeo4.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c index 0766ed489a..b713261fa9 100644 --- a/libavcodec/indeo4.c +++ b/libavcodec/indeo4.c @@ -387,6 +387,10 @@ static int decode_band_hdr(IVI45DecContext *ctx, IVIBandDesc *band, av_log(avctx, AV_LOG_ERROR, "mismatching scan table!\n"); return AVERROR_INVALIDDATA; } + if (band->transform_size == 8 && band->blk_size < 8) { + av_log(avctx, AV_LOG_ERROR, "mismatching transform_size!\n"); + return AVERROR_INVALIDDATA; + } /* decode block huffman codebook */ if (ff_ivi_dec_huff_desc(&ctx->gb, get_bits1(&ctx->gb), IVI_BLK_HUFF, |