Skip to content

Commit 1d92796

Browse files
committed
Merge branch 'PHP-8.3'
* PHP-8.3: Prevent closing of unrelated handles
2 parents 0695b97 + ffc355c commit 1d92796

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ PHP NEWS
5858
. Fixed bugs GH-15908 and GH-15026 (leak / assertion failure in streams.c).
5959
(nielsdos)
6060

61+
- TSRM:
62+
. Prevent closing of unrelated handles. (cmb)
63+
6164
- Zip:
6265
. Added ZipArchive::ER_TRUNCATED_ZIP added in libzip 1.11. (Remi)
6366

TSRM/tsrm_win32.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,7 @@ TSRM_API int shmget(key_t key, size_t size, int flags)
708708
if (NULL != shm->descriptor && (shm->descriptor->shm_perm.key != key || size > shm->descriptor->shm_segsz)) {
709709
if (NULL != shm->segment) {
710710
CloseHandle(shm->segment);
711+
shm->segment = INVALID_HANDLE_VALUE;
711712
}
712713
UnmapViewOfFile(shm->descriptor);
713714
shm->descriptor = NULL;

0 commit comments

Comments
 (0)