From 00bb3277c67b2fb8363e067fffc0599276f7f60d Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 23 Jul 2021 12:43:03 +0200 Subject: [PATCH] Fix #81283: shmop_read(): count is out of range `start`, `count` and `shmop->size` are `zend_long`, so we must not restrict to `INT_MAX`. --- ext/shmop/shmop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c index 07414f2bca745..78f109df42ab0 100644 --- a/ext/shmop/shmop.c +++ b/ext/shmop/shmop.c @@ -251,7 +251,7 @@ PHP_FUNCTION(shmop_read) RETURN_FALSE; } - if (count < 0 || start > (INT_MAX - count) || start + count > shmop->size) { + if (count < 0 || start > (ZEND_LONG_MAX - count) || start + count > shmop->size) { php_error_docref(NULL, E_WARNING, "count is out of range"); RETURN_FALSE; }