summaryrefslogtreecommitdiff
path: root/ext/spl/php_spl.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2015-08-19 18:41:28 +0800
committerXinchen Hui <laruence@php.net>2015-08-19 18:41:28 +0800
commitb584b513983319be170f02828bc7c12850b40320 (patch)
treefc72fb64848ae8e3356deffa339179328f01e3b5 /ext/spl/php_spl.c
parentc12aa3c7ce01067be35aecd15c5622945e8651e0 (diff)
downloadphp-git-b584b513983319be170f02828bc7c12850b40320.tar.gz
Fixed bug #70290 (Null pointer deref (segfault) in spl_autoload via ob_start)
Diffstat (limited to 'ext/spl/php_spl.c')
-rw-r--r--ext/spl/php_spl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c
index 6b886b7ef3..3424b90aea 100644
--- a/ext/spl/php_spl.c
+++ b/ext/spl/php_spl.c
@@ -358,7 +358,7 @@ PHP_FUNCTION(spl_autoload)
* The "scope" is determined by an opcode, if it is ZEND_FETCH_CLASS we know function was called indirectly by
* the Zend engine.
*/
- if (active_opline->opcode != ZEND_FETCH_CLASS) {
+ if (EG(opline_ptr) && active_opline->opcode != ZEND_FETCH_CLASS) {
zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Class %s could not be loaded", class_name);
} else {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Class %s could not be loaded", class_name);