Skip to content

Commit 97fc3bf

Browse files
committed
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4: Fix int truncation of read length in shmop_read()
2 parents a0ddc2a + 64cf7b2 commit 97fc3bf

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎ext/shmop/shmop.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ PHP_FUNCTION(shmop_read)
224224
zend_long start, count;
225225
php_shmop *shmop;
226226
char *startaddr;
227-
int bytes;
228227
zend_string *return_string;
229228

230229
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Oll", &shmid, shmop_ce, &start, &count) == FAILURE) {
@@ -244,7 +243,7 @@ PHP_FUNCTION(shmop_read)
244243
}
245244

246245
startaddr = shmop->addr + start;
247-
bytes = count ? count : shmop->size - start;
246+
zend_long bytes = count ? count : shmop->size - start;
248247

249248
return_string = zend_string_init(startaddr, bytes, 0);
250249

0 commit comments

Comments
 (0)