cvs: php4 /ext/standard var.c

From: Date: Wed, 11 Jul 2001 05:57:18 +0000
Subject: cvs: php4 /ext/standard var.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-6168@lists.php.net to get a copy of this message
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); ?> Index: php4/ext/standard/var.c diff -u php4/ext/standard/var.c:1.92 php4/ext/standard/var.c:1.93 --- php4/ext/standard/var.c:1.92 Mon Jul 9 05:03:05 2001 +++ php4/ext/standard/var.c Wed Jul 11 01:57:18 2001 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var.c,v 1.92 2001/07/09 09:03:05 thies Exp $ */ +/* $Id: var.c,v 1.93 2001/07/11 05:57:18 shane Exp $ */ /* {{{ includes @@ -342,6 +342,7 @@ FREE_ZVAL(d); break; } + if (data == struc) return; php_var_serialize(buf, data, var_hash); } }

« previous php.cvs (#6168) next »