Re: cvs: php-src(PHP_5_3) /ext/standard basic_functions.c
| From: | Ilia Alshanetsky | Date: | Mon, 21 Apr 2008 14:24:14 +0000 |
| Subject: | Re: cvs: php-src(PHP_5_3) /ext/standard basic_functions.c | ||
| References: | 1 2 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-49695@lists.php.net to get a copy of this message | ||
On 20-Apr-08, at 11:21 AM, Hannes Magnusson wrote:
On Sun, Apr 20, 2008 at 5:07 PM, Ilia Alshanetsky <iliaa@php.net> wrote:Good points, I'll apply the changes in a few minutes. Ilia AlshanetskyCopy&paste typo? (shouldn't it say "Invalid tick callback?")iliaa Sun Apr 20 15:07:39 2008 UTCModified files: (Branch: PHP_5_3) /php-src/ext/standard basic_functions.cLog: Fixed a bug #44403 (register_tick_function() does not check for a valid callback) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.27&r2=1.725.2.31.2.64.2.28&diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.27 php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.28 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.27 Tue Apr 15 09:02:40 2008+++ php-src/ext/standard/basic_functions.c Sun Apr 20 15:07:39 2008@@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.27 2008/04/15 09:02:40 jani Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.28 2008/04/20 15:07:39 iliaa Exp $ */ #include "php.h" #include "php_streams.h" @@ -6045,6 +6045,7 @@ {user_tick_function_entry tick_fe; int i; + char *function_name = NULL;tick_fe.calling = 0; tick_fe.arg_count = ZEND_NUM_ARGS();@@ -6060,6 +6061,13 @@RETURN_FALSE; }+ if (!zend_is_callable(tick_fe.arguments[0], 0, &function_name)) { + efree(tick_fe.arguments); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid shutdown callback '%s' passed", function_name);Didn't you forget to free function_name on success?+ efree(function_name); + RETURN_FALSE; + }+