com php-src: Avoid usage of uninitialized data: Zend/zend_obj ect_handlers.c

From: Date: Thu, 15 Jan 2015 18:08:21 +0000
Subject: com php-src: Avoid usage of uninitialized data: Zend/zend_obj ect_handlers.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-84121@lists.php.net to get a copy of this message
Commit: 3477135cd1024c897dc070c37ddae411839b6e7e Author: Dmitry Stogov <dmitry@zend.com> Thu, 15 Jan 2015 21:08:21 +0300 Parents: 34723d1b75cb6b9a686c6643ac194e86c0c95f74 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3477135cd1024c897dc070c37ddae411839b6e7e Log: Avoid usage of uninitialized data Changed paths: M Zend/zend_object_handlers.c Diff: diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 2dde1d1..c1e8a54 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -1035,15 +1035,14 @@ static union _zend_function *zend_std_get_method(zend_object **obj_ptr, zend_str if (EXPECTED(key != NULL)) { lc_method_name = Z_STR_P(key); + use_heap = 0; } else { STR_ALLOCA_ALLOC(lc_method_name, method_name->len, use_heap); zend_str_tolower_copy(lc_method_name->val, method_name->val, method_name->len); } if (UNEXPECTED((func = zend_hash_find(&zobj->ce->function_table, lc_method_name)) == NULL)) { - if (UNEXPECTED(!key)) { - STR_ALLOCA_FREE(lc_method_name, use_heap); - } + STR_ALLOCA_FREE(lc_method_name, use_heap); if (zobj->ce->__call) { return zend_get_user_call_function(zobj->ce, method_name); } else { @@ -1098,9 +1097,7 @@ static union _zend_function *zend_std_get_method(zend_object **obj_ptr, zend_str } } - if (UNEXPECTED(!key)) { - STR_ALLOCA_FREE(lc_method_name, use_heap); - } + STR_ALLOCA_FREE(lc_method_name, use_heap); return fbc; } /* }}} */

« previous php.cvs (#84121) next »