diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index a23263d407e6f..5e85d4cf79e2e 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -1142,14 +1142,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); } /* }}} */