mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Prevent closing of unrelated handles
This commit is contained in:
commit
ffc355c83f
2 changed files with 4 additions and 0 deletions
3
NEWS
3
NEWS
|
@ -24,6 +24,9 @@ PHP NEWS
|
||||||
. Fixed bugs GH-15908 and GH-15026 (leak / assertion failure in streams.c).
|
. Fixed bugs GH-15908 and GH-15026 (leak / assertion failure in streams.c).
|
||||||
(nielsdos)
|
(nielsdos)
|
||||||
|
|
||||||
|
- TSRM:
|
||||||
|
. Prevent closing of unrelated handles. (cmb)
|
||||||
|
|
||||||
12 Sep 2024, PHP 8.3.12
|
12 Sep 2024, PHP 8.3.12
|
||||||
|
|
||||||
- Core:
|
- Core:
|
||||||
|
|
|
@ -707,6 +707,7 @@ TSRM_API int shmget(key_t key, size_t size, int flags)
|
||||||
if (NULL != shm->descriptor && (shm->descriptor->shm_perm.key != key || size > shm->descriptor->shm_segsz)) {
|
if (NULL != shm->descriptor && (shm->descriptor->shm_perm.key != key || size > shm->descriptor->shm_segsz)) {
|
||||||
if (NULL != shm->segment) {
|
if (NULL != shm->segment) {
|
||||||
CloseHandle(shm->segment);
|
CloseHandle(shm->segment);
|
||||||
|
shm->segment = INVALID_HANDLE_VALUE;
|
||||||
}
|
}
|
||||||
UnmapViewOfFile(shm->descriptor);
|
UnmapViewOfFile(shm->descriptor);
|
||||||
shm->descriptor = NULL;
|
shm->descriptor = NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue