diff --git a/NEWS b/NEWS index 92c2903a60c..40f246c9ad8 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,9 @@ PHP NEWS . Fixed bug #81226 (Integer overflow behavior is different with JIT enabled). (Dmitry) +- Shmop: + . Fixed bug #81283 (shmop can't read beyond 2147483647 bytes). (cmb, Nikita) + - Standard: . Fixed bug #72146 (Integer overflow on substr_replace). (cmb) . Fixed bug #81265 (getimagesize returns 0 for 256px ICO images). diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c index 249359bbdd2..7ed37b4fb81 100644 --- a/ext/shmop/shmop.c +++ b/ext/shmop/shmop.c @@ -241,7 +241,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(); }