mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: Fix NULL arithmetic in System V shared memory emulation
This commit is contained in:
commit
5c066e04b2
2 changed files with 14 additions and 11 deletions
1
NEWS
1
NEWS
|
@ -19,6 +19,7 @@ PHP NEWS
|
||||||
. Fixed bug GH-17408 (Assertion failure Zend/zend_exceptions.c).
|
. Fixed bug GH-17408 (Assertion failure Zend/zend_exceptions.c).
|
||||||
(nielsdos, ilutov)
|
(nielsdos, ilutov)
|
||||||
. Fix may_have_extra_named_args flag for ZEND_AST_UNPACK. (nielsdos)
|
. Fix may_have_extra_named_args flag for ZEND_AST_UNPACK. (nielsdos)
|
||||||
|
. Fix NULL arithmetic in System V shared memory emulation for Windows. (cmb)
|
||||||
|
|
||||||
- DOM:
|
- DOM:
|
||||||
. Fixed bug GH-17397 (Assertion failure ext/dom/php_dom.c). (nielsdos)
|
. Fixed bug GH-17397 (Assertion failure ext/dom/php_dom.c). (nielsdos)
|
||||||
|
|
|
@ -402,6 +402,7 @@ static shm_pair *shm_get(key_t key, void *addr)
|
||||||
shm_pair *ptr;
|
shm_pair *ptr;
|
||||||
shm_pair *newptr;
|
shm_pair *newptr;
|
||||||
|
|
||||||
|
if (TWG(shm) != NULL) {
|
||||||
for (ptr = TWG(shm); ptr < (TWG(shm) + TWG(shm_size)); ptr++) {
|
for (ptr = TWG(shm); ptr < (TWG(shm) + TWG(shm_size)); ptr++) {
|
||||||
if (!ptr->descriptor) {
|
if (!ptr->descriptor) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -416,6 +417,7 @@ static shm_pair *shm_get(key_t key, void *addr)
|
||||||
if (ptr < (TWG(shm) + TWG(shm_size))) {
|
if (ptr < (TWG(shm) + TWG(shm_size))) {
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
newptr = (shm_pair*)realloc((void*)TWG(shm), (TWG(shm_size)+1)*sizeof(shm_pair));
|
newptr = (shm_pair*)realloc((void*)TWG(shm), (TWG(shm_size)+1)*sizeof(shm_pair));
|
||||||
if (newptr == NULL) {
|
if (newptr == NULL) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue