Commit f9883a66 authored by Andreas Cadhalpun's avatar Andreas Cadhalpun

wavpack: use get_bits_long to read up to 32 bits

get_bits should not be used for more than 25 bits.
Reviewed-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
Signed-off-by: 's avatarAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
parent 317be53c
......@@ -155,7 +155,7 @@ static int wv_get_value(WavpackFrameContext *ctx, GetBitContext *gb,
if (t >= 2) {
if (get_bits_left(gb) < t - 1)
goto error;
t = get_bits(gb, t - 1) | (1 << (t - 1));
t = get_bits_long(gb, t - 1) | (1 << (t - 1));
} else {
if (get_bits_left(gb) < 0)
goto error;
......@@ -186,7 +186,7 @@ static int wv_get_value(WavpackFrameContext *ctx, GetBitContext *gb,
} else {
if (get_bits_left(gb) < t2 - 1)
goto error;
t += get_bits(gb, t2 - 1) | (1 << (t2 - 1));
t += get_bits_long(gb, t2 - 1) | (1 << (t2 - 1));
}
}
......
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