diff options
| author | Antony Dovgal <tony2001@php.net> | 2012-10-26 16:36:47 +0400 |
|---|---|---|
| committer | Antony Dovgal <tony2001@php.net> | 2012-10-26 16:42:21 +0400 |
| commit | 01dee2c4b009d052f0fdfa07f35c181a1ac4aca0 (patch) | |
| tree | b560c80c7c48a630b8e547d5f61e8265fb72916c | |
| parent | d21d909072bb9b3ca3d5777ce237b79ccba7cf32 (diff) | |
| download | php-git-01dee2c4b009d052f0fdfa07f35c181a1ac4aca0.tar.gz | |
fix bug #63369
(un)serialize() leaves dangling pointers, causes crashes
| -rw-r--r-- | ext/standard/basic_functions.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index a30579e143..d6377df84d 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -3732,6 +3732,11 @@ PHP_MSHUTDOWN_FUNCTION(basic) /* {{{ */ PHP_RINIT_FUNCTION(basic) /* {{{ */ { memset(BG(strtok_table), 0, 256); + + BG(serialize_lock) = 0; + memset(&BG(serialize), 0, sizeof(BG(serialize))); + memset(&BG(unserialize), 0, sizeof(BG(unserialize))); + BG(strtok_string) = NULL; BG(strtok_zval) = NULL; BG(strtok_last) = NULL; |
