com php-src: Fixed NULL pointer dereference: Zend/zend_builti n_functions.c

From: Date: Mon, 03 Mar 2014 08:10:15 +0000
Subject: com php-src: Fixed NULL pointer dereference: Zend/zend_builti n_functions.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-77833@lists.php.net to get a copy of this message
Commit: e1d1be148ecf1b9a25fa60685eadc5f20061ae45 Author: Xinchen Hui <laruence@gmail.com> Mon, 3 Mar 2014 16:10:15 +0800 Parents: 0fe209e317cb48133c087c693203376465ca4053 Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e1d1be148ecf1b9a25fa60685eadc5f20061ae45 Log: Fixed NULL pointer dereference Changed paths: M Zend/zend_builtin_functions.c Diff: diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index a32d853..b32de18 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1103,7 +1103,9 @@ ZEND_FUNCTION(method_exists) if (Z_TYPE_P(klass) == IS_OBJECT) { ce = Z_OBJCE_P(klass); } else if (Z_TYPE_P(klass) == IS_STRING) { - ce = zend_lookup_class(Z_STR_P(klass) TSRMLS_CC); + if ((ce = zend_lookup_class(Z_STR_P(klass) TSRMLS_CC)) == NULL) { + RETURN_FALSE; + } } else { RETURN_FALSE; }

« previous php.cvs (#77833) next »