mirror of
https://github.com/php/php-src.git
synced 2025-08-18 23:18:56 +02:00
MFB: Fixed bug #41628 (PHP settings leak between Virtual Hosts in Apache 1.3).
This commit is contained in:
parent
33e5346a5a
commit
91bcba1f1d
1 changed files with 9 additions and 3 deletions
|
@ -749,9 +749,15 @@ static void *php_create_dir(pool *p, char *dummy)
|
|||
*/
|
||||
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;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue