Skip to content

Commit 71879d3

Browse files
committed
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4: Fix #81283: shmop can't read beyond 2147483647 bytes
2 parents 90ee1c3 + 387c0de commit 71879d3

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ PHP NEWS
2727
. Fixed bug #81226 (Integer overflow behavior is different with JIT
2828
enabled). (Dmitry)
2929

30+
- Shmop:
31+
. Fixed bug #81283 (shmop can't read beyond 2147483647 bytes). (cmb, Nikita)
32+
3033
- Standard:
3134
. Fixed bug #72146 (Integer overflow on substr_replace). (cmb)
3235
. Fixed bug #81265 (getimagesize returns 0 for 256px ICO images).

ext/shmop/shmop.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ PHP_FUNCTION(shmop_read)
241241
RETURN_THROWS();
242242
}
243243

244-
if (count < 0 || start > (INT_MAX - count) || start + count > shmop->size) {
244+
if (count < 0 || start > (ZEND_LONG_MAX - count) || start + count > shmop->size) {
245245
zend_argument_value_error(3, "is out of range");
246246
RETURN_THROWS();
247247
}

0 commit comments

Comments
 (0)