mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-21 23:10:13 +00:00
alsdec: make sure no invalid opt_order stays in the context.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
1acc553e54
commit
dfacef9e73
@ -664,6 +664,7 @@ static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd)
|
|||||||
2, sconf->max_order + 1));
|
2, sconf->max_order + 1));
|
||||||
*bd->opt_order = get_bits(gb, opt_order_length);
|
*bd->opt_order = get_bits(gb, opt_order_length);
|
||||||
if (*bd->opt_order > sconf->max_order) {
|
if (*bd->opt_order > sconf->max_order) {
|
||||||
|
*bd->opt_order = sconf->max_order;
|
||||||
av_log(avctx, AV_LOG_ERROR, "Predictor order too large!\n");
|
av_log(avctx, AV_LOG_ERROR, "Predictor order too large!\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user