[php-src] master: Merge branch 'PHP-8.5'

Ilia Alshanetsky <[email protected]>
Newsgroups gmane.comp.php.cvs.general
Message-ID <[email protected]>
Author: Ilia Alshanetsky (iliaal)
Date: 2026-06-26T14:27:26-04:00

Commit: https://github.com/php/php-src/commit/1e9506d4f53eb13ac0662bed56c2769704c91fad
Raw diff: https://github.com/php/php-src/commit/1e9506d4f53eb13ac0662bed56c2769704c91fad.diff

Merge branch 'PHP-8.5'

* PHP-8.5:
  Fix int truncation of read length in shmop_read()

Changed paths:
  M  ext/shmop/shmop.c


Diff:

diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c
index 645ce172fdcd..7903a294a037 100644
--- a/ext/shmop/shmop.c
+++ b/ext/shmop/shmop.c
@@ -224,7 +224,6 @@ PHP_FUNCTION(shmop_read)
 	zend_long start, count;
 	php_shmop *shmop;
 	char *startaddr;
-	int bytes;
 	zend_string *return_string;
 
 	if (zend_parse_parameters(ZEND_NUM_ARGS(), "Oll", &shmid, shmop_ce, &start, &count) == FAILURE) {
@@ -244,7 +243,7 @@ PHP_FUNCTION(shmop_read)
 	}
 
 	startaddr = shmop->addr + start;
-	bytes = count ? count : shmop->size - start;
+	zend_long bytes = count ? count : shmop->size - start;
 
 	return_string = zend_string_init(startaddr, bytes, 0);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.