1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-8.2'

* PHP-8.2:
  Fix potential NULL pointer dereference Windows shm*() functions
This commit is contained in:
Christoph M. Becker
2022-11-02 14:55:08 +01:00
2 changed files with 4 additions and 3 deletions

1
NEWS
View File

@@ -22,6 +22,7 @@ PHP NEWS
. SA_ONSTACK is now set when signals are disabled. (Kévin Dunglas)
. Fix GH-9649: Signal handlers now do a no-op instead of crashing when
executed on threads not managed by TSRM. (Kévin Dunglas)
. Fixed potential NULL pointer dereference Windows shm*() functions. (cmb)
- Fileinfo:
. Upgrade bundled libmagic to 5.43. (Anatol)

View File

@@ -686,7 +686,7 @@ TSRM_API void *shmat(int key, const void *shmaddr, int flags)
{/*{{{*/
shm_pair *shm = shm_get(key, NULL);
if (!shm->segment) {
if (!shm || !shm->segment) {
return (void*)-1;
}
@@ -703,7 +703,7 @@ TSRM_API int shmdt(const void *shmaddr)
shm_pair *shm = shm_get(0, (void*)shmaddr);
int ret;
if (!shm->segment) {
if (!shm || !shm->segment) {
return -1;
}
@@ -723,7 +723,7 @@ TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf)
{/*{{{*/
shm_pair *shm = shm_get(key, NULL);
if (!shm->segment) {
if (!shm || !shm->segment) {
return -1;
}