summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorGustavo André dos Santos Lopes <cataphract@php.net>2012-03-18 18:23:27 +0000
committerGustavo André dos Santos Lopes <cataphract@php.net>2012-03-18 18:23:27 +0000
commit920072df6561b2e7df29a2860f440f89e701c733 (patch)
tree6facda0dcd19e6582aa4600e4616a082f6652d28 /ext/reflection/php_reflection.c
parentd870a411186638907a1e6b064a02fbe7afc03f2e (diff)
downloadphp-git-920072df6561b2e7df29a2860f440f89e701c733.tar.gz
- Fixed bug #61388 (ReflectionObject:getProperties() issues invalid reads
when get_properties returns a hash table with (inaccessible) dynamic numeric properties).
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index b5ea8386c5..28184e1cc6 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -3832,6 +3832,13 @@ static int _adddynproperty(zval **pptr TSRMLS_DC, int num_args, va_list args, ze
zend_class_entry *ce = *va_arg(args, zend_class_entry**);
zval *retval = va_arg(args, zval*), member;
+ /* under some circumstances, the properties hash table may contain numeric
+ * properties (e.g. when casting from array). This is a WONT FIX bug, at
+ * least for the moment. Ignore these */
+ if (hash_key->nKeyLength == 0) {
+ return 0;
+ }
+
if (hash_key->arKey[0] == '\0') {
return 0; /* non public cannot be dynamic */
}