Skip to content

Commit 5618169

Browse files
committed
Finish reverting gmp_pow overflow check
1 parent 7b9b832 commit 5618169

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

ext/gmp/gmp.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,14 +1142,7 @@ ZEND_FUNCTION(gmp_pow)
11421142
RETURN_THROWS();
11431143
}
11441144

1145-
double powmax = log((double)ZEND_LONG_MAX);
1146-
11471145
INIT_GMP_RETVAL(gmpnum_result);
1148-
zend_ulong gmpnum = mpz_get_ui(gmpnum_base);
1149-
if ((log(gmpnum) * exp) > powmax) {
1150-
zend_value_error("base and exponent overflow");
1151-
RETURN_THROWS();
1152-
}
11531146
mpz_pow_ui(gmpnum_result, gmpnum_base, exp);
11541147
}
11551148
/* }}} */

0 commit comments

Comments
 (0)