com php-src: Fixed possible NULL pointer dereference: Zend/zend_object_handlers.c
| From: | Dmitry Stogov | Date: | Wed, 19 Feb 2014 11:33:10 +0000 |
| Subject: | com php-src: Fixed possible NULL pointer dereference: Zend/zend_object_handlers.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-78036@lists.php.net to get a copy of this message | ||
Commit: 3e89e92f57033cfd21ee5505b872bf17d77d2b6d
Author: Xinchen Hui <laruence@gmail.com> Wed, 19 Feb 2014 19:33:10 +0800
Parents: a52659bc25a2b018f81ae1ac492664bdba464f43
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3e89e92f57033cfd21ee5505b872bf17d77d2b6d
Log:
Fixed possible NULL pointer dereference
Changed paths:
M Zend/zend_object_handlers.c
Diff:
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index 7cb16e1..a3a024b 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -1408,21 +1408,22 @@ static int zend_std_has_property(zval *object, zval *member, int
has_set_exists,
goto found;
}
if (UNEXPECTED(zobj->properties != NULL)) {
- value = zend_hash_find(zobj->properties, property_info->name);
+ if ((value = zend_hash_find(zobj->properties, property_info->name)) != NULL) {
found:
- switch (has_set_exists) {
- case 0:
- result = (Z_TYPE_P(value) != IS_NULL);
- break;
- default:
- result = zend_is_true(value TSRMLS_CC);
- break;
- case 2:
- result = 1;
- break;
+ switch (has_set_exists) {
+ case 0:
+ result = (Z_TYPE_P(value) != IS_NULL);
+ break;
+ default:
+ result = zend_is_true(value TSRMLS_CC);
+ break;
+ case 2:
+ result = 1;
+ break;
+ }
}
+ goto exit;
}
- goto exit;
}
result = 0;