com php-src: fix bug #63369: ext/standard/basic_functions.c
| From: | Antony Dovgal | Date: | Fri, 26 Oct 2012 12:42:21 +0000 |
| Subject: | com php-src: fix bug #63369: ext/standard/basic_functions.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-70468@lists.php.net to get a copy of this message | ||
Commit: 01dee2c4b009d052f0fdfa07f35c181a1ac4aca0
Author: Antony Dovgal <tony2001@php.net> Fri, 26 Oct 2012 16:36:47 +0400
Parents: d21d909072bb9b3ca3d5777ce237b79ccba7cf32
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=01dee2c4b009d052f0fdfa07f35c181a1ac4aca0
Log:
fix bug #63369
(un)serialize() leaves dangling pointers, causes crashes
Bugs:
https://bugs.php.net/63369
Changed paths:
M ext/standard/basic_functions.c
Diff:
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index a30579e..d6377df 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;