summaryrefslogtreecommitdiff
path: root/Zend/zend_API.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2007-12-25 10:58:30 +0000
committerDmitry Stogov <dmitry@php.net>2007-12-25 10:58:30 +0000
commit43f6392e9009eb45f56b069c4bfd82774423fe09 (patch)
tree0c0f2e870c0f5b76df4931674f565ebb0708db3a /Zend/zend_API.c
parented5a424b4f419ba293f0d4ea31cfb98b83ec92c8 (diff)
downloadphp-git-43f6392e9009eb45f56b069c4bfd82774423fe09.tar.gz
Fixed bug #43651 (is_callable() with one or more nonconsecutive colons crashes)
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r--Zend/zend_API.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index d852d2e689..017fb2657c 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -2328,15 +2328,14 @@ static int zend_is_callable_check_func(int check_flags, zval ***zobj_ptr_ptr, ze
clen = colon - Z_STRVAL_P(callable);
mlen = Z_STRLEN_P(callable) - clen - 2;
lmname = colon + 2;
- }
- if (colon && colon == Z_STRVAL_P(callable)) {
- return 0;
- }
- if (colon != NULL) {
+ if (colon == Z_STRVAL_P(callable)) {
+ return 0;
+ }
+
/* This is a compound name.
* Try to fetch class and then find static method. */
- *ce_ptr = zend_fetch_class(Z_STRVAL_P(callable), clen, ZEND_FETCH_CLASS_AUTO TSRMLS_CC);
+ *ce_ptr = zend_fetch_class(Z_STRVAL_P(callable), clen, ZEND_FETCH_CLASS_AUTO | ZEND_FETCH_CLASS_SILENT TSRMLS_CC);
if (!*ce_ptr) {
return 0;
}