Skip to content

Commit

Permalink
fix bug #63369
Browse files Browse the repository at this point in the history
(un)serialize() leaves dangling pointers, causes crashes
  • Loading branch information
tony2001 committed Oct 26, 2012
1 parent d21d909 commit 01dee2c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ext/standard/basic_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 01dee2c

Please sign in to comment.