[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/win32/registry.c trunk/win32/registry.c

2011-01-09 Thread Pierre Joye
pajoye   Mon, 10 Jan 2011 01:04:36 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=307318

Log:
- local redeclaration

Changed paths:
U   php/php-src/branches/PHP_5_3/win32/registry.c
U   php/php-src/trunk/win32/registry.c

Modified: php/php-src/branches/PHP_5_3/win32/registry.c
===
--- php/php-src/branches/PHP_5_3/win32/registry.c   2011-01-10 00:59:19 UTC 
(rev 307317)
+++ php/php-src/branches/PHP_5_3/win32/registry.c   2011-01-10 01:04:36 UTC 
(rev 307318)
@@ -95,14 +95,14 @@
char *index;
uint index_len;
ulong num;
-   zval **data;
+   zval **tmpdata;

for 
(zend_hash_internal_pointer_reset_ex(parent_ht, pos);
-
zend_hash_get_current_data_ex(parent_ht, (void**)data, pos) == SUCCESS 
+
zend_hash_get_current_data_ex(parent_ht, (void**)tmpdata, pos) == SUCCESS 
 
zend_hash_get_current_key_ex(parent_ht, index, index_len, num, 0, pos) == 
HASH_KEY_IS_STRING;
 
zend_hash_move_forward_ex(parent_ht, pos)) {
-   if (zend_hash_add(ht, index, 
index_len, data, sizeof(zval*), NULL) == SUCCESS) {
-   Z_ADDREF_PP(data);
+   if (zend_hash_add(ht, index, 
index_len, tmpdata, sizeof(zval*), NULL) == SUCCESS) {
+   Z_ADDREF_PP(tmpdata);
}
}
}

Modified: php/php-src/trunk/win32/registry.c
===
--- php/php-src/trunk/win32/registry.c  2011-01-10 00:59:19 UTC (rev 307317)
+++ php/php-src/trunk/win32/registry.c  2011-01-10 01:04:36 UTC (rev 307318)
@@ -95,14 +95,14 @@
char *index;
uint index_len;
ulong num;
-   zval **data;
+   zval **tmpdata;

for 
(zend_hash_internal_pointer_reset_ex(parent_ht, pos);
-
zend_hash_get_current_data_ex(parent_ht, (void**)data, pos) == SUCCESS 
+
zend_hash_get_current_data_ex(parent_ht, (void**)tmpdata, pos) == SUCCESS 
 
zend_hash_get_current_key_ex(parent_ht, index, index_len, num, 0, pos) == 
HASH_KEY_IS_STRING;
 
zend_hash_move_forward_ex(parent_ht, pos)) {
-   if (zend_hash_add(ht, index, 
index_len, data, sizeof(zval*), NULL) == SUCCESS) {
-   Z_ADDREF_PP(data);
+   if (zend_hash_add(ht, index, 
index_len, tmpdata, sizeof(zval*), NULL) == SUCCESS) {
+   Z_ADDREF_PP(tmpdata);
}
}
}

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/win32/registry.c trunk/win32/registry.c

2009-10-13 Thread Stanislav Malyshev
stas Tue, 13 Oct 2009 20:10:07 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=289622

Log:
add safeguard for UpdateIniFromRegistry on NULL arg

Changed paths:
U   php/php-src/branches/PHP_5_3/win32/registry.c
U   php/php-src/trunk/win32/registry.c

Modified: php/php-src/branches/PHP_5_3/win32/registry.c
===
--- php/php-src/branches/PHP_5_3/win32/registry.c   2009-10-13 19:58:59 UTC 
(rev 289621)
+++ php/php-src/branches/PHP_5_3/win32/registry.c   2009-10-13 20:10:07 UTC 
(rev 289622)
@@ -168,6 +168,10 @@
int path_len;
HashTable **pht;

+   if(!path) {
+   return;
+   }
+
if (!PW32G(registry_directories)) {
PW32G(registry_directories) = 
(HashTable*)malloc(sizeof(HashTable));
zend_hash_init(PW32G(registry_directories), 0, NULL, 
delete_internal_hashtable, 1);

Modified: php/php-src/trunk/win32/registry.c
===
--- php/php-src/trunk/win32/registry.c  2009-10-13 19:58:59 UTC (rev 289621)
+++ php/php-src/trunk/win32/registry.c  2009-10-13 20:10:07 UTC (rev 289622)
@@ -168,6 +168,10 @@
int path_len;
HashTable **pht;

+   if(!path) {
+   return;
+   }
+
if (!PW32G(registry_directories)) {
PW32G(registry_directories) = 
(HashTable*)malloc(sizeof(HashTable));
zend_hash_init(PW32G(registry_directories), 0, NULL, 
delete_internal_hashtable, 1);

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