From 424ba0f2ff9677d16b4e339e90885bd4bc49fcf1 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Wed, 27 Nov 2024 21:18:08 +0000 Subject: [PATCH] Finish reverting gmp_pow overflow check --- ext/gmp/gmp.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index 868283da183b4..edcc3c46e1301 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -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); } /* }}} */