Commit b28c678b authored by Michael Niedermayer's avatar Michael Niedermayer

wmaprodec; fix get_bits(0) case.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 97a5addf
...@@ -1130,7 +1130,7 @@ static int decode_subframe(WMAProDecodeCtx *s) ...@@ -1130,7 +1130,7 @@ static int decode_subframe(WMAProDecodeCtx *s)
int num_fill_bits; int num_fill_bits;
if (!(num_fill_bits = get_bits(&s->gb, 2))) { if (!(num_fill_bits = get_bits(&s->gb, 2))) {
int len = get_bits(&s->gb, 4); int len = get_bits(&s->gb, 4);
num_fill_bits = get_bits(&s->gb, len) + 1; num_fill_bits = (len ? get_bits(&s->gb, len) : 0) + 1;
} }
if (num_fill_bits >= 0) { if (num_fill_bits >= 0) {
......
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