We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0339754 commit bc67ae2Copy full SHA for bc67ae2
ext/gmp/gmp.c
@@ -372,10 +372,11 @@ static zend_result shift_operator_helper(gmp_binary_ui_op_t op, zval *return_val
372
goto typeof_op_failure;
373
}
374
375
- if (shift > SHRT_MAX && opcode == ZEND_POW) {
+ if (shift > INT_MAX / 1000) {
376
zend_throw_error(
377
- zend_ce_value_error, "Exponent must be less than %d",
378
- SHRT_MAX
+ zend_ce_value_error, "%s must be less than %d",
+ opcode == ZEND_POW ? "Exponent" : "Shift",
379
+ (INT_MAX / 1000)
380
);
381
ZVAL_UNDEF(return_value);
382
return FAILURE;
0 commit comments