com php-src: Check that the type is correct: ext/standard/incom plete_class.c
| From: | Stanislav Malyshev | Date: | Mon, 23 Mar 2015 01:17:47 +0000 |
| Subject: | com php-src: Check that the type is correct: ext/standard/incom plete_class.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-85776@lists.php.net to get a copy of this message | ||
Commit: fb83c76deec58f1fab17c350f04c9f042e5977d1
Author: Stanislav Malyshev <stas@php.net> Sun, 22 Mar 2015 18:17:47 -0700
Parents: 95b9c34f0222e02d83f837555c7198948a6732fb
Branches: PHP-5.4 PHP-5.5 PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=fb83c76deec58f1fab17c350f04c9f042e5977d1
Log:
Check that the type is correct
Changed paths:
M ext/standard/incomplete_class.c
Diff:
diff --git a/ext/standard/incomplete_class.c b/ext/standard/incomplete_class.c
index 1816ac4..30c82e6 100644
--- a/ext/standard/incomplete_class.c
+++ b/ext/standard/incomplete_class.c
@@ -144,7 +144,7 @@ PHPAPI char *php_lookup_class_name(zval *object, zend_uint *nlen)
object_properties = Z_OBJPROP_P(object);
- if (zend_hash_find(object_properties, MAGIC_MEMBER, sizeof(MAGIC_MEMBER), (void **) &val) ==
SUCCESS) {
+ if (zend_hash_find(object_properties, MAGIC_MEMBER, sizeof(MAGIC_MEMBER), (void **) &val) ==
SUCCESS && Z_TYPE_PP(val) == IS_STRING) {
retval = estrndup(Z_STRVAL_PP(val), Z_STRLEN_PP(val));
if (nlen) {