stas Wed, 01 Feb 2012 19:52:05 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=323007
Log: fix UMR in php_register_variable_ex, reported by Stefan Esser Changed paths: U php/php-src/branches/PHP_5_3/main/php_variables.c U php/php-src/branches/PHP_5_4/main/php_variables.c U php/php-src/trunk/main/php_variables.c Modified: php/php-src/branches/PHP_5_3/main/php_variables.c =================================================================== --- php/php-src/branches/PHP_5_3/main/php_variables.c 2012-02-01 19:44:38 UTC (rev 323006) +++ php/php-src/branches/PHP_5_3/main/php_variables.c 2012-02-01 19:52:05 UTC (rev 323007) @@ -198,6 +198,9 @@ MAKE_STD_ZVAL(gpc_element); array_init(gpc_element); zend_symtable_update(symtable1, escaped_index, index_len + 1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p); + } else { + efree(var_orig); + return; } } if (index != escaped_index) { Modified: php/php-src/branches/PHP_5_4/main/php_variables.c =================================================================== --- php/php-src/branches/PHP_5_4/main/php_variables.c 2012-02-01 19:44:38 UTC (rev 323006) +++ php/php-src/branches/PHP_5_4/main/php_variables.c 2012-02-01 19:52:05 UTC (rev 323007) @@ -186,6 +186,9 @@ MAKE_STD_ZVAL(gpc_element); array_init(gpc_element); zend_symtable_update(symtable1, escaped_index, index_len + 1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p); + } else { + free_alloca(var_orig, use_heap); + return; } } if (index != escaped_index) { Modified: php/php-src/trunk/main/php_variables.c =================================================================== --- php/php-src/trunk/main/php_variables.c 2012-02-01 19:44:38 UTC (rev 323006) +++ php/php-src/trunk/main/php_variables.c 2012-02-01 19:52:05 UTC (rev 323007) @@ -186,6 +186,9 @@ MAKE_STD_ZVAL(gpc_element); array_init(gpc_element); zend_symtable_update(symtable1, escaped_index, index_len + 1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p); + } else { + free_alloca(var_orig, use_heap); + return; } } if (index != escaped_index) {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php