mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1: Fix potential NULL pointer dereference Windows shm*() functions
This commit is contained in:
commit
79d4fdad52
2 changed files with 4 additions and 3 deletions
1
NEWS
1
NEWS
|
@ -5,6 +5,7 @@ PHP NEWS
|
||||||
- Core:
|
- Core:
|
||||||
. Fixed bug GH-9823 (Don’t reset func in zend_closure_internal_handler).
|
. Fixed bug GH-9823 (Don’t reset func in zend_closure_internal_handler).
|
||||||
(Florian Sowade)
|
(Florian Sowade)
|
||||||
|
. Fixed potential NULL pointer dereference Windows shm*() functions. (cmb)
|
||||||
|
|
||||||
- FPM:
|
- FPM:
|
||||||
. Fixed bug GH-9754 (SaltStack (using Python subprocess) hangs when running
|
. Fixed bug GH-9754 (SaltStack (using Python subprocess) hangs when running
|
||||||
|
|
|
@ -686,7 +686,7 @@ TSRM_API void *shmat(int key, const void *shmaddr, int flags)
|
||||||
{/*{{{*/
|
{/*{{{*/
|
||||||
shm_pair *shm = shm_get(key, NULL);
|
shm_pair *shm = shm_get(key, NULL);
|
||||||
|
|
||||||
if (!shm->segment) {
|
if (!shm || !shm->segment) {
|
||||||
return (void*)-1;
|
return (void*)-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -703,7 +703,7 @@ TSRM_API int shmdt(const void *shmaddr)
|
||||||
shm_pair *shm = shm_get(0, (void*)shmaddr);
|
shm_pair *shm = shm_get(0, (void*)shmaddr);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!shm->segment) {
|
if (!shm || !shm->segment) {
|
||||||
return -1;
|
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);
|
shm_pair *shm = shm_get(key, NULL);
|
||||||
|
|
||||||
if (!shm->segment) {
|
if (!shm || !shm->segment) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue