com php-src: fix possible null ptr deref: ext/standard/basic_ functions.c

From: Date: Fri, 12 Sep 2014 20:31:02 +0000
Subject: com php-src: fix possible null ptr deref: ext/standard/basic_ functions.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-81533@lists.php.net to get a copy of this message
Commit: e251ecb6e96ae3a53ad6187346a07b2e3b0b1a90 Author: Anatol Belski <ab@php.net> Fri, 12 Sep 2014 22:31:02 +0200 Parents: 7ac5a36a2f37b167d0114e6e2720086ba5c6c567 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e251ecb6e96ae3a53ad6187346a07b2e3b0b1a90 Log: fix possible null ptr deref Changed paths: M ext/standard/basic_functions.c Diff: diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index f37ae56...de4d711 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -5011,7 +5011,11 @@ PHP_FUNCTION(register_shutdown_function) /* Prevent entering of anything but valid callback (syntax check only!) */ if (!zend_is_callable(&shutdown_function_entry.arguments[0], 0, &callback_name TSRMLS_CC)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid shutdown callback '%s' passed", callback_name->val); + if (callback_name) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid shutdown callback '%s' passed", callback_name->val); + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid shutdown callback passed"); + } efree(shutdown_function_entry.arguments); RETVAL_FALSE; } else {

« previous php.cvs (#81533) next »