Ver a proveniência

Add check for below array bounds

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
46-string-keys 0.8.5
Nobuhiro Iwamatsu há 11 anos
committed by Paul J. Davis
ascendente
cometimento
d16a4fd968
1 ficheiros alterados com 2 adições e 0 eliminações
  1. +2
    -0
      c_src/double-conversion/fast-dtoa.cc

+ 2
- 0
c_src/double-conversion/fast-dtoa.cc Ver ficheiro

@ -253,6 +253,8 @@ static void BiggestPowerTen(uint32_t number,
// number < (2^number_bits - 2) yet.
while (number < kSmallPowersOfTen[exponent_plus_one_guess]) {
exponent_plus_one_guess--;
if (exponent_plus_one_guess <= 0)
break;
}
*power = kSmallPowersOfTen[exponent_plus_one_guess];
*exponent_plus_one = exponent_plus_one_guess;

Carregando…
Cancelar
Guardar