Commit 92f7f1db authored by Michael Niedermayer's avatar Michael Niedermayer

indeo4: Check for mismatching scan tables

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent a60a4d70
...@@ -393,6 +393,10 @@ static int decode_band_hdr(IVI4DecContext *ctx, IVIBandDesc *band, ...@@ -393,6 +393,10 @@ static int decode_band_hdr(IVI4DecContext *ctx, IVIBandDesc *band,
band->is_2d_trans = transforms[transform_id].is_2d_trans; band->is_2d_trans = transforms[transform_id].is_2d_trans;
scan_indx = get_bits(&ctx->gb, 4); scan_indx = get_bits(&ctx->gb, 4);
if ((scan_indx>4 && scan_indx<10) != (band->blk_size==4)) {
av_log(avctx, AV_LOG_ERROR, "mismatching scan table!\n");
return AVERROR_INVALIDDATA;
}
if (scan_indx == 15) { if (scan_indx == 15) {
av_log(avctx, AV_LOG_ERROR, "Custom scan pattern encountered!\n"); av_log(avctx, AV_LOG_ERROR, "Custom scan pattern encountered!\n");
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment