Re: cvs: php4 /ext/standard var.c

From: Date: Wed, 11 Jul 2001 11:01:19 +0000
Subject: Re: cvs: php4 /ext/standard var.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-6171@lists.php.net to get a copy of this message
On Wed, Jul 11, 2001 at 05:57:18AM -0000, Shane Caraveo wrote: > shane Wed Jul 11 01:57:18 2001 EDT > > Modified files: > /php4/ext/standard var.c > Log: > prevent php from crashing when serializing circular data. > > This script produced the crash. > <? > $hash["test_key"] = "test_value"; > $hash["hash_key"] = &$hash; > echo serialize($hash); > ?> with your patch i don't get the crash but instead: X-Powered-By: PHP/4.0.7-dev Content-type: text/html a:2:{s:8:"test_key";s:10:"test_value";s:8:"hash_key";a:2:{s:8:"test_key";s:10:"test_value";s:8:"hash_key";}../../php4/Zend/zend_execute.c(450) : Freeing 0x083EF5E4 (11 bytes), script=- ../../php4/Zend/zend_variables.c(106) : Actual location (location was relayed) ../../php4/Zend/zend_execute.c(447) : Freeing 0x083EF5A4 (12 bytes), script=- ../../php4/Zend/zend_hash.c(277) : Freeing 0x083EF544 (44 bytes), script=- ../../php4/Zend/zend_hash.c(193) : Freeing 0x083EF4F4 (32 bytes), script=- ../../php4/Zend/zend_execute.c(725) : Freeing 0x083EF494 (44 bytes), script=- ../../php4/Zend/zend_API.c(582) : Actual location (location was relayed) ../../php4/Zend/zend_execute.c(722) : Freeing 0x083EF3FC (12 bytes), script=- i think we need some extra checks. tc

« previous php.cvs (#6171) next »