dnxhddec: check that the indicated bit depth matches the tables.
Fixes crash Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
8c59e0c362
commit
6c0027bb39
@ -82,6 +82,10 @@ static int dnxhd_init_vlc(DNXHDContext *ctx, int cid)
|
|||||||
av_log(ctx->avctx, AV_LOG_ERROR, "unsupported cid %d\n", cid);
|
av_log(ctx->avctx, AV_LOG_ERROR, "unsupported cid %d\n", cid);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
if (ff_dnxhd_cid_table[index].bit_depth != ctx->bit_depth) {
|
||||||
|
av_log(ctx->avctx, AV_LOG_ERROR, "bit depth mismatches %d %d\n", ff_dnxhd_cid_table[index].bit_depth, ctx->bit_depth);
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
ctx->cid_table = &ff_dnxhd_cid_table[index];
|
ctx->cid_table = &ff_dnxhd_cid_table[index];
|
||||||
|
|
||||||
ff_free_vlc(&ctx->ac_vlc);
|
ff_free_vlc(&ctx->ac_vlc);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user