mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-7.4'
* PHP-7.4: Fix #79427: Integer Overflow in shmop_open()
This commit is contained in:
commit
2a1d7bd802
1 changed files with 5 additions and 0 deletions
|
@ -176,6 +176,11 @@ PHP_FUNCTION(shmop_open)
|
|||
goto err;
|
||||
}
|
||||
|
||||
if (shm.shm_segsz > ZEND_LONG_MAX) {
|
||||
php_error_docref(NULL, E_WARNING, "shared memory segment too large to attach");
|
||||
goto err;
|
||||
}
|
||||
|
||||
shmop->addr = shmat(shmop->shmid, 0, shmop->shmatflg);
|
||||
if (shmop->addr == (char*) -1) {
|
||||
php_error_docref(NULL, E_WARNING, "Unable to attach to shared memory segment '%s'", strerror(errno));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue