Commit 9bad6dda authored by François Cartegnie's avatar François Cartegnie 🤞

vlc_bits: fix overflow in bs_read_ue

refs #17591
parent 68dc8e75
......@@ -238,7 +238,7 @@ static inline uint32_t bs_read_ue( bs_t * bs )
while( bs_read1( bs ) == 0 && bs->p < bs->p_end && i < 31 )
i++;
return (1 << i) - 1 + bs_read( bs, i );
return ((uint32_t)1 << i) - 1 + bs_read( bs, i );
}
/* Read signed Exp-Golomb code */
......
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