mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Finish reverting gmp_pow overflow check
This commit is contained in:
parent
0833f2376e
commit
424ba0f2ff
1 changed files with 0 additions and 7 deletions
|
@ -1140,14 +1140,7 @@ ZEND_FUNCTION(gmp_pow)
|
|||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
double powmax = log((double)ZEND_LONG_MAX);
|
||||
|
||||
INIT_GMP_RETVAL(gmpnum_result);
|
||||
zend_ulong gmpnum = mpz_get_ui(gmpnum_base);
|
||||
if ((log(gmpnum) * exp) > powmax) {
|
||||
zend_value_error("base and exponent overflow");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
mpz_pow_ui(gmpnum_result, gmpnum_base, exp);
|
||||
}
|
||||
/* }}} */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue