1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #81283: shmop can't read beyond 2147483647 bytes
This commit is contained in:
Christoph M. Becker
2021-07-23 17:49:24 +02:00
2 changed files with 4 additions and 1 deletions

3
NEWS
View File

@@ -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).

View File

@@ -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();
}