Commit 7df8c931 authored by François Cartegnie's avatar François Cartegnie 🤞

vlc_bits: bs_skip ovfw (fix #17985)

parent eafc03ef
......@@ -162,10 +162,12 @@ static inline void bs_skip( bs_t *s, ssize_t i_count )
if( s->i_left <= 0 )
{
const int i_bytes = ( -s->i_left + 8 ) / 8;
const size_t i_bytes = 1 + s->i_left / -8;
bs_forward( s, i_bytes );
s->i_left += 8 * i_bytes;
if( i_bytes * 8 < i_bytes /* ofw */ )
s->i_left = i_bytes;
else
s->i_left += 8 * i_bytes;
}
}
......
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