Skip to content
Snippets Groups Projects
Commit 4b657a1b authored by Andreas Cadhalpun's avatar Andreas Cadhalpun Committed by Michael Niedermayer
Browse files

alac: reject rice_limit 0 if compression is used


If rice_limit is 0, k can be 0 in decode_scalar, which calls show_bits(gb, k).

Signed-off-by: default avatarAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 802c0af6
No related branches found
No related tags found
No related merge requests found
......@@ -316,6 +316,11 @@ static int decode_element(AVCodecContext *avctx, AVFrame *frame, int ch_index,
int lpc_quant[2];
int rice_history_mult[2];
if (!alac->rice_limit) {
avpriv_request_sample(alac->avctx, "Compression with rice limit 0");
return AVERROR(ENOSYS);
}
decorr_shift = get_bits(&alac->gb, 8);
decorr_left_weight = get_bits(&alac->gb, 8);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment