cvs: php-src(PHP_4_4) / NEWS /ext/standard array.c /ext/standard/tests/array bug33989.phpt
| From: | Dmitry Stogov | Date: | Thu, 04 Aug 2005 10:37:52 +0000 |
| Subject: | cvs: php-src(PHP_4_4) / NEWS /ext/standard array.c /ext/standard/tests/array bug33989.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-33170@lists.php.net to get a copy of this message | ||
dmitry Thu Aug 4 06:37:52 2005 EDT
Added files: (Branch: PHP_4_4)
/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.1247.2.920.2.19&r2=1.1247.2.920.2.20&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.920.2.19 php-src/NEWS:1.1247.2.920.2.20
--- php-src/NEWS:1.1247.2.920.2.19 Mon Jul 25 16:36:32 2005
+++ php-src/NEWS Thu Aug 4 06:37:50 2005
@@ -1,6 +1,7 @@
PHP 4 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2005, Version 4.4.1
+- Fixed bug #33989 (extract($GLOBALS,EXTR_REFS) crashes PHP). (Dmitry)
- Fixed bug #33690 (Crash setting some ini directives in httpd.conf). (Rasmus)
- Fixed bug #33673 (Added detection for partially uploaded files). (Ilia)
- Fixed bug #33648 (Using --with-regex=system causes compile failure). (Andrei)
http://cvs.php.net/diff.php/php-src/ext/standard/array.c?r1=1.199.2.44.2.3&r2=1.199.2.44.2.4&ty=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.199.2.44.2.3 php-src/ext/standard/array.c:1.199.2.44.2.4
--- php-src/ext/standard/array.c:1.199.2.44.2.3 Mon Jul 11 12:25:46 2005
+++ php-src/ext/standard/array.c Thu Aug 4 06:37:51 2005
@@ -22,7 +22,7 @@
*/
-/* $Id: array.c,v 1.199.2.44.2.3 2005/07/11 16:25:46 dmitry Exp $ */
+/* $Id: array.c,v 1.199.2.44.2.4 2005/08/04 10:37:51 dmitry Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -1300,11 +1300,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