1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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>
This commit is contained in:
Michael Niedermayer 2013-01-26 03:17:19 +01:00
parent cfc7b9cfff
commit 66daebc9d5

View File

@ -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,