diff options
author | Anatol Belski <ab@php.net> | 2015-09-22 20:33:46 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2015-09-22 20:33:46 +0200 |
commit | faa50318a39503e65acf3958e0c10698f5c6f80f (patch) | |
tree | 25794fac766b85774e724cd44a1451351da79cdb /TSRM | |
parent | 0e843a45820941345d1b1695040ab699cf3a0b2a (diff) | |
download | php-git-faa50318a39503e65acf3958e0c10698f5c6f80f.tar.gz |
nullify the memory chunk to avoid crashes when freeing resource
Diffstat (limited to 'TSRM')
-rw-r--r-- | TSRM/tsrm_win32.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index 285ab61e48..42a7294646 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -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; } |