summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2002-02-02 19:35:18 +0000
committerAndi Gutmans <andi@php.net>2002-02-02 19:35:18 +0000
commit2c95fc2d553c3ece602bab89d639754cebf8c5a2 (patch)
treee46f353050dd12811c556b55c281bfd294ed07c5
parent5319d84400eea07027d4ddda847559c09b536bf4 (diff)
downloadphp-git-2c95fc2d553c3ece602bab89d639754cebf8c5a2.tar.gz
- Please don't use strcmp() and friends in Zend but only the mem*
- functions. I didn't check this patch so please check that it works.
-rw-r--r--Zend/zend_builtin_functions.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index a2488f147f..b3c56d751c 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -556,7 +556,7 @@ static void is_a_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool only_subclass)
else
ce = Z_OBJCE_PP(obj);
for (; ce != NULL; ce = ce->parent) {
- if (!strncmp(ce->name, lcname, MIN(ce->name_length, (uint)Z_STRLEN_PP(class_name)))) {
+ if ((ce->name_length == Z_STRLEN_PP(class_name)) && !memcmp(ce->name, lcname, ce->name_length)) {
efree(lcname);
RETURN_TRUE;
}