mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
nullify the memory chunk to avoid crashes when freeing resource
This commit is contained in:
@@ -437,6 +437,7 @@ static shm_pair *shm_get(int key, void *addr)
|
||||
TWG(shm) = newptr;
|
||||
ptr = newptr + TWG(shm_size);
|
||||
TWG(shm_size)++;
|
||||
memset(ptr, 0, sizeof(*ptr));
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user