summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-11-24 16:41:18 +0100
committerNikita Popov <nikita.ppv@gmail.com>2020-11-24 16:42:16 +0100
commit706241f82d675421766b23fad4923f22b2c8e32c (patch)
treecb6a9dc02319d00c78a0f19ccd75056f6c54c1bc /ext/reflection/php_reflection.c
parentd016434ad33284dfaceb8d233351d34356566d7d (diff)
downloadphp-git-706241f82d675421766b23fad4923f22b2c8e32c.tar.gz
Fix usage of casted string in ReflectionParameter ctor
Fixes oss-fuzz #27755.
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 620d95afa4..6384e2b410 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -2306,10 +2306,10 @@ ZEND_METHOD(reflection_parameter, __construct)
/* nothing to do. don't set is_closure since is the invoke handler,
not the closure itself */
} else if ((fptr = zend_hash_find_ptr(&ce->function_table, lcname)) == NULL) {
+ zend_throw_exception_ex(reflection_exception_ptr, 0,
+ "Method %s::%s() does not exist", ZSTR_VAL(ce->name), ZSTR_VAL(name));
zend_string_release(name);
zend_string_release(lcname);
- zend_throw_exception_ex(reflection_exception_ptr, 0,
- "Method %s::%s() does not exist", ZSTR_VAL(ce->name), Z_STRVAL_P(method));
return;
}
zend_string_release(name);