scottmac                Mon Jun 18 15:52:46 2007 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src    NEWS 
    /php-src/sapi/apache        mod_php5.c 
  Log:
  Fixed bug #41628 (PHP settings leak between Virtual Hosts in Apache 1.3).
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.785&r2=1.2027.2.547.2.786&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.785 php-src/NEWS:1.2027.2.547.2.786
--- php-src/NEWS:1.2027.2.547.2.785     Sun Jun 17 14:31:11 2007
+++ php-src/NEWS        Mon Jun 18 15:52:46 2007
@@ -39,6 +39,8 @@
   constants). (Dmitry)
 - Fixed bug #41630 (segfault when an invalid color index is present in
   the image data). (Reported by Elliot <[EMAIL PROTECTED] dot com>) (Pierre)
+- Fixed bug #41628 (PHP settings leak between Virtual Hosts in
+  Apache 1.3). (Scott, manuel at mausz dot at)
 - Fixed bug #41608 (segfault on a weird code with objects and switch()). 
   (Tony)
 - Fixed bug #41600 (url rewriter tags doesn't work with namespaced tags).
http://cvs.php.net/viewvc.cgi/php-src/sapi/apache/mod_php5.c?r1=1.19.2.7.2.9&r2=1.19.2.7.2.10&diff_format=u
Index: php-src/sapi/apache/mod_php5.c
diff -u php-src/sapi/apache/mod_php5.c:1.19.2.7.2.9 
php-src/sapi/apache/mod_php5.c:1.19.2.7.2.10
--- php-src/sapi/apache/mod_php5.c:1.19.2.7.2.9 Mon Jan  1 09:36:12 2007
+++ php-src/sapi/apache/mod_php5.c      Mon Jun 18 15:52:46 2007
@@ -17,7 +17,7 @@
    | PHP 4.0 patches by Zeev Suraski <[EMAIL PROTECTED]>                      |
    +----------------------------------------------------------------------+
  */
-/* $Id: mod_php5.c,v 1.19.2.7.2.9 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: mod_php5.c,v 1.19.2.7.2.10 2007/06/18 15:52:46 scottmac Exp $ */
 
 #include "php_apache_http.h"
 #include "http_conf_globals.h"
@@ -764,9 +764,15 @@
  */
 static void *php_merge_dir(pool *p, void *basev, void *addv)
 {
-       /* This function *must* return addv, and not modify basev */
-       zend_hash_merge_ex((HashTable *) addv, (HashTable *) basev, 
(copy_ctor_func_t) copy_per_dir_entry, sizeof(php_per_dir_entry), 
(merge_checker_func_t) should_overwrite_per_dir_entry, NULL);
-       return addv;
+       /* This function *must* not modify addv or basev */
+       HashTable *new;
+
+       /* need a copy of addv to merge */
+       new = php_create_dir(p, "php_merge_dir");
+       zend_hash_copy(new, (HashTable *) addv, (copy_ctor_func_t) 
copy_per_dir_entry, NULL, sizeof(php_per_dir_entry));
+
+       zend_hash_merge_ex(new, (HashTable *) basev, (copy_ctor_func_t) 
copy_per_dir_entry, sizeof(php_per_dir_entry), (merge_checker_func_t) 
should_overwrite_per_dir_entry, NULL);
+       return new;
 }
 /* }}} */
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to