ref: bd747b11cc509ccf9016061957f4e551c87fced9
parent: 44ad79e92d653b3fa0226c273190b357aea740e2
author: James Almer <jamrial@gmail.com>
date: Mon Nov 5 19:14:06 EST 2018
getbits: prevent undefined shift in dav1d_get_vlc()
--- a/src/getbits.c
+++ b/src/getbits.c
@@ -95,7 +95,7 @@
while (!dav1d_get_bits(c, 1))
if (++n_bits == 32)
return 0xFFFFFFFFU;
- return n_bits ? ((1 << n_bits) - 1) + dav1d_get_bits(c, n_bits) : 0;
+ return n_bits ? ((1U << n_bits) - 1) + dav1d_get_bits(c, n_bits) : 0;
}
static unsigned get_bits_subexp_u(GetBits *const c, const unsigned ref,