Commit ccb422a6 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'cd78e934'

* commit 'cd78e934':
  indeo4: Validate scantable dimension

See: 92f7f1dbMerged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 8c0bb195 cd78e934
......@@ -355,14 +355,20 @@ static int decode_band_hdr(IVI45DecContext *ctx, IVIBandDesc *band,
band->transform_size= (transform_id < 10) ? 8 : 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) {
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) {
av_log(avctx, AV_LOG_ERROR, "mismatching scan table!\n");
return AVERROR_INVALIDDATA;
}
} else if (band->blk_size != 8) {
av_log(avctx, AV_LOG_ERROR, "mismatching scan table!\n");
return AVERROR_INVALIDDATA;
}
band->scan = scan_index_to_tab[scan_indx];
band->scan_size = band->blk_size;
......
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