diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c index a33a5373b7f..ce810a78239 100644 --- a/ext/shmop/shmop.c +++ b/ext/shmop/shmop.c @@ -235,7 +235,7 @@ PHP_FUNCTION(shmop_read) RETURN_THROWS(); } - if (count < 0 || start > (INT_MAX - count) || start + count > shmop->size) { + if (count < 0 || start > (ZEND_LONG_MAX - count) || start + count > shmop->size) { zend_argument_value_error(3, "is out of range"); RETURN_THROWS(); }