Skip to content

Commit 424ba0f

Browse files
devnexenGirgias
authored andcommitted
Finish reverting gmp_pow overflow check
1 parent 0833f23 commit 424ba0f

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
@@ -1140,14 +1140,7 @@ ZEND_FUNCTION(gmp_pow)
11401140
RETURN_THROWS();
11411141
}
11421142

1143-
double powmax = log((double)ZEND_LONG_MAX);
1144-
11451143
INIT_GMP_RETVAL(gmpnum_result);
1146-
zend_ulong gmpnum = mpz_get_ui(gmpnum_base);
1147-
if ((log(gmpnum) * exp) > powmax) {
1148-
zend_value_error("base and exponent overflow");
1149-
RETURN_THROWS();
1150-
}
11511144
mpz_pow_ui(gmpnum_result, gmpnum_base, exp);
11521145
}
11531146
/* }}} */

0 commit comments

Comments
 (0)