cvs: php-src / NEWS /ext/standard array.c /ext/standard/tests/array bug33989.phpt
| From: | Dmitry Stogov | Date: | Thu, 04 Aug 2005 10:34:40 +0000 |
| Subject: | cvs: php-src / NEWS /ext/standard array.c /ext/standard/tests/array bug33989.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-33168@lists.php.net to get a copy of this message | ||
dmitry Thu Aug 4 06:34:40 2005 EDT
Added files:
/php-src/ext/standard/tests/array bug33989.phpt
Modified files:
/php-src NEWS
/php-src/ext/standard array.c
Log:
Fixed bug #33989 (extract($GLOBALS,EXTR_REFS) crashes PHP)
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2018&r2=1.2019&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2018 php-src/NEWS:1.2019
--- php-src/NEWS:1.2018 Tue Aug 2 13:01:04 2005
+++ php-src/NEWS Thu Aug 4 06:34:37 2005
@@ -1,6 +1,7 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2005, PHP 5.1
+- Fixed bug #33989 (extract($GLOBALS,EXTR_REFS) crashes PHP). (Dmitry)
- Fixed bug #33967 (misuse of Exception constructor doesn't display errorfile).
(Jani)
- Fixed bug #33958 (duplicate cookies and magic_quotes=off may cause a crash).
http://cvs.php.net/diff.php/php-src/ext/standard/array.c?r1=1.307&r2=1.308&ty=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.307 php-src/ext/standard/array.c:1.308
--- php-src/ext/standard/array.c:1.307 Wed Aug 3 10:07:54 2005
+++ php-src/ext/standard/array.c Thu Aug 4 06:34:38 2005
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: array.c,v 1.307 2005/08/03 14:07:54 sniper Exp $ */
+/* $Id: array.c,v 1.308 2005/08/04 10:34:38 dmitry Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -1442,11 +1442,11 @@
zval **orig_var;
if (zend_hash_find(EG(active_symbol_table), final_name.c, final_name.len+1, (void **)
&orig_var) == SUCCESS) {
- zval_ptr_dtor(orig_var);
-
SEPARATE_ZVAL_TO_MAKE_IS_REF(entry);
zval_add_ref(entry);
+ zval_ptr_dtor(orig_var);
+
*orig_var = *entry;
} else {
if ((*var_array)->refcount > 1) {
http://cvs.php.net/co.php/php-src/ext/standard/tests/array/bug33989.phpt?r=1.1&p=1
Index: php-src/ext/standard/tests/array/bug33989.phpt
+++ php-src/ext/standard/tests/array/bug33989.phpt
--TEST--
Bug #33989 (extract($GLOBALS,EXTR_REFS) crashes PHP)
--FILE--
<?php
$a="a";
extract($GLOBALS, EXTR_REFS);
echo "ok\n";
?>
--EXPECT--
ok