• Rémi Denis-Courmont's avatar
    vlc_bits: fix integer overflow in signed ExpGolomb code · 61eb0882
    Rémi Denis-Courmont authored
    When bs_read_ue() returned 2^32-1, computing (val + 1) as 'int'
    overflowed. With this patch, the conversion from unsigned to signed is
    performed after the division by two, so that the absolute value range
    is always within limits of the signed 32-bits integer type.
    
    Also use fast types since the function are meant to be inlined.
    61eb0882
Name
Last commit
Last update
autotools Loading commit data...
bin Loading commit data...
compat Loading commit data...
contrib Loading commit data...
doc Loading commit data...
extras Loading commit data...
include Loading commit data...
lib Loading commit data...
m4 Loading commit data...
modules Loading commit data...
po Loading commit data...
share Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
COPYING.LIB Loading commit data...
INSTALL Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
THANKS Loading commit data...
bootstrap Loading commit data...
configure.ac Loading commit data...
make-alias Loading commit data...