[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog
changelog Sat Feb 17 01:31:04 2007 UTC Modified files: /ZendEngine2ChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1068r2=1.1069diff_format=u Index: ZendEngine2/ChangeLog diff -u ZendEngine2/ChangeLog:1.1068 ZendEngine2/ChangeLog:1.1069 --- ZendEngine2/ChangeLog:1.1068Fri Feb 16 01:31:09 2007 +++ ZendEngine2/ChangeLog Sat Feb 17 01:31:03 2007 @@ -1,3 +1,50 @@ +2007-02-16 Antony Dovgal [EMAIL PROTECTED] + +* (PHP_5_2) + zend_alloc.c: + fix typo + +* zend_alloc.c: + typo in Dmitry's last name =) + +2007-02-16 Dmitry Stogov [EMAIL PROTECTED] + +* zend_compile.c + zend_compile.h + zend_execute.c + zend_execute_API.c + zend_globals.h + zend_vm_def.h + zend_vm_execute.h: + Added runtime JIT auto-globals fetching and caching + +2007-02-16 Antony Dovgal [EMAIL PROTECTED] + +* zend_alloc.h: + fix build + +2007-02-16 Stanislav Malyshev [EMAIL PROTECTED] + +* zend_alloc.c + zend_alloc.c + zend_alloc.h + zend_alloc.h: + add safe_realloc + +* (PHP_5_2) + zend_alloc.h: + fix typo + +2007-02-16 Dmitry Stogov [EMAIL PROTECTED] + +* zend_globals_macros.h + zend_globals_macros.h: + Allow C++ extensions to use CG(), EG() ... (Caroline) + +* zend_llist.c + zend_llist.c: + Fixed zend_llist_remove_tail (Michael Wallner) + 2007-02-15 Dmitry Stogov [EMAIL PROTECTED] * zend_compile.c @@ -16860,7 +16907,7 @@ 2003-06-10 Jani Taskinen [EMAIL PROTECTED] * zend_multiply.h: - - Missing $Id: ChangeLog,v 1.1068 2007/02/16 01:31:09 changelog Exp $ tag + - Missing $Id: ChangeLog,v 1.1069 2007/02/17 01:31:03 changelog Exp $ tag 2003-06-10 James Cox [EMAIL PROTECTED] @@ -18584,7 +18631,7 @@ zend_types.h zend_variables.c zend_variables.h: - - Added some missing CVS $Id: ChangeLog,v 1.1068 2007/02/16 01:31:09 changelog Exp $ tags, headers and footers. + - Added some missing CVS $Id: ChangeLog,v 1.1069 2007/02/17 01:31:03 changelog Exp $ tags, headers and footers. 2003-01-30 Ilia Alshanetsky [EMAIL PROTECTED]
[PHP-CVS] cvs: php-src(PHP_4_4) / NEWS
tony2001Fri Feb 16 08:21:31 2007 UTC Modified files: (Branch: PHP_4_4) /php-srcNEWS Log: BFN http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.1247.2.920.2.193r2=1.1247.2.920.2.194diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.920.2.193 php-src/NEWS:1.1247.2.920.2.194 --- php-src/NEWS:1.1247.2.920.2.193 Tue Feb 13 20:23:28 2007 +++ php-src/NEWSFri Feb 16 08:21:30 2007 @@ -2,6 +2,8 @@ ||| ?? ??? 2007, Version 4.4.6 - Updated PCRE to version 7.0. (Nuno) +- Fixed segfault in ext/session when register_globals=On. (Tony) +- Fixed bug #40502 (ext/interbase compile failure). (Tony) 14 Feb 2007, Version 4.4.5 - Upgraded PEAR to 1.5.0. (Greg) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/imap php_imap.c
On 2/16/07, Antony Dovgal [EMAIL PROTECTED] wrote: On 02/16/2007 05:04 AM, Ilia Alshanetsky wrote: What version of c-client are you using? For me here the code does not show any errors via valgrind 3.2.3. It's quite old, yes - imap-2004c. imap-2006d works ok in the same time. Ok, I found a solution, this patch fixes it: Yup. Fixes it for my good old cclient-2004g too -Hannes Index: ext/imap/php_imap.c === RCS file: /repository/php-src/ext/imap/php_imap.c,v retrieving revision 1.208.2.7.2.17 diff -u -p -d -r1.208.2.7.2.17 php_imap.c --- ext/imap/php_imap.c 13 Feb 2007 20:12:52 - 1.208.2.7.2.17 +++ ext/imap/php_imap.c 16 Feb 2007 07:04:00 - @@ -2215,7 +2215,7 @@ PHP_FUNCTION(imap_utf8) if (dest.data) { free(dest.data); } - if (src.data) { + if (src.data src.data != dest.data) { free(src.data); } } In c-client sources they use similar if's. -- Wbr, Antony Dovgal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/gd/tests bug38179.phpt
tony2001Fri Feb 16 11:08:11 2007 UTC Modified files: /php-src/ext/gd/tests bug38179.phpt Log: fix test name http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug38179.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/gd/tests/bug38179.phpt diff -u php-src/ext/gd/tests/bug38179.phpt:1.1 php-src/ext/gd/tests/bug38179.phpt:1.2 --- php-src/ext/gd/tests/bug38179.phpt:1.1 Wed Jul 26 08:58:31 2006 +++ php-src/ext/gd/tests/bug38179.phpt Fri Feb 16 11:08:11 2007 @@ -1,5 +1,5 @@ --TEST-- -imagecopy doen't copy alpha, palette to truecolor +Bug #38179 (imagecopy from a palette to a truecolor image loses alpha channel) --SKIPIF-- ?php if (!function_exists('imagecopy')) die(skip gd extension not available\n); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd/tests bug38179.phpt
tony2001Fri Feb 16 11:08:22 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/gd/tests bug38179.phpt Log: MFH http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug38179.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/gd/tests/bug38179.phpt diff -u php-src/ext/gd/tests/bug38179.phpt:1.1.2.2 php-src/ext/gd/tests/bug38179.phpt:1.1.2.3 --- php-src/ext/gd/tests/bug38179.phpt:1.1.2.2 Wed Jul 26 08:59:55 2006 +++ php-src/ext/gd/tests/bug38179.phpt Fri Feb 16 11:08:22 2007 @@ -1,5 +1,5 @@ --TEST-- -imagecopy doen't copy alpha, palette to truecolor +Bug #38179 (imagecopy from a palette to a truecolor image loses alpha channel) --SKIPIF-- ?php if (!function_exists('imagecopy')) die(skip gd extension not available\n); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /sapi/cgi cgi_main.c
dmitry Fri Feb 16 11:30:03 2007 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/sapi/cgi cgi_main.c Log: Fixed bug #40286 (PHP fastcgi with PHP_FCGI_CHILDREN don't kill children when parent is killed) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.544r2=1.2027.2.547.2.545diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.544 php-src/NEWS:1.2027.2.547.2.545 --- php-src/NEWS:1.2027.2.547.2.544 Fri Feb 16 08:33:28 2007 +++ php-src/NEWSFri Feb 16 11:30:03 2007 @@ -22,6 +22,8 @@ (Dmitry) - Fixed bug #40410 (ext/posix does not compile on MacOS 10.3.9). (Tony) - Fixed Bug #40352 (FCGI_WEB_SERVER_ADDRS function get lost). (Dmitry) +- Fixed bug #40286 (PHP fastcgi with PHP_FCGI_CHILDREN don't kill children when + parent is killed). (Dmitry) - Fixed bug #40236 (php -a function allocation eats memory). (Dmitry) - Fixed bug #40109 (iptcembed fails on non-jfif jpegs). (Tony) - Fixed bug #39836 (SplObjectStorage empty after unserialize). (Marcus) http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.22r2=1.267.2.15.2.23diff_format=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.22 php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.23 --- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.22 Thu Feb 15 12:33:16 2007 +++ php-src/sapi/cgi/cgi_main.c Fri Feb 16 11:30:03 2007 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: cgi_main.c,v 1.267.2.15.2.22 2007/02/15 12:33:16 dmitry Exp $ */ +/* $Id: cgi_main.c,v 1.267.2.15.2.23 2007/02/16 11:30:03 dmitry Exp $ */ #include php.h #include php_globals.h @@ -355,18 +355,14 @@ static int sapi_cgi_read_post(char *buffer, uint count_bytes TSRMLS_DC) { - uint read_bytes=0, tmp_read_bytes; -#if PHP_FASTCGI - char *pos = buffer; -#endif + int read_bytes=0, tmp_read_bytes; count_bytes = MIN(count_bytes, (uint) SG(request_info).content_length - SG(read_post_bytes)); while (read_bytes count_bytes) { #if PHP_FASTCGI if (fcgi_is_fastcgi()) { fcgi_request *request = (fcgi_request*) SG(server_context); - tmp_read_bytes = fcgi_read(request, pos, count_bytes - read_bytes); - pos += tmp_read_bytes; + tmp_read_bytes = fcgi_read(request, buffer + read_bytes, count_bytes - read_bytes); } else { tmp_read_bytes = read(0, buffer + read_bytes, count_bytes - read_bytes); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /sapi/cgi cgi_main.c
dmitry Fri Feb 16 11:30:38 2007 UTC Modified files: /php-src/sapi/cgi cgi_main.c Log: Fixed bug #40286 (PHP fastcgi with PHP_FCGI_CHILDREN don't kill children when parent is killed) http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.309r2=1.310diff_format=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.309 php-src/sapi/cgi/cgi_main.c:1.310 --- php-src/sapi/cgi/cgi_main.c:1.309 Thu Feb 15 12:33:54 2007 +++ php-src/sapi/cgi/cgi_main.c Fri Feb 16 11:30:38 2007 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: cgi_main.c,v 1.309 2007/02/15 12:33:54 dmitry Exp $ */ +/* $Id: cgi_main.c,v 1.310 2007/02/16 11:30:38 dmitry Exp $ */ #include php.h #include php_globals.h @@ -344,15 +344,13 @@ static int sapi_cgi_read_post(char *buffer, uint count_bytes TSRMLS_DC) { - uint read_bytes=0, tmp_read_bytes; - char *pos = buffer; + int read_bytes=0, tmp_read_bytes; count_bytes = MIN(count_bytes, (uint) SG(request_info).content_length - SG(read_post_bytes)); while (read_bytes count_bytes) { if (fcgi_is_fastcgi()) { fcgi_request *request = (fcgi_request*) SG(server_context); - tmp_read_bytes = fcgi_read(request, pos, count_bytes - read_bytes); - pos += tmp_read_bytes; + tmp_read_bytes = fcgi_read(request, buffer + read_bytes, count_bytes - read_bytes); } else { tmp_read_bytes = read(0, buffer + read_bytes, count_bytes - read_bytes); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_4) / NEWS /sapi/cgi cgi_main.c
dmitry Fri Feb 16 11:47:20 2007 UTC Modified files: (Branch: PHP_4_4) /php-srcNEWS /php-src/sapi/cgi cgi_main.c Log: Fixed bug #40286 (PHP fastcgi with PHP_FCGI_CHILDREN don't kill children when parent is killed) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.1247.2.920.2.194r2=1.1247.2.920.2.195diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.920.2.194 php-src/NEWS:1.1247.2.920.2.195 --- php-src/NEWS:1.1247.2.920.2.194 Fri Feb 16 08:21:30 2007 +++ php-src/NEWSFri Feb 16 11:47:19 2007 @@ -4,6 +4,8 @@ - Updated PCRE to version 7.0. (Nuno) - Fixed segfault in ext/session when register_globals=On. (Tony) - Fixed bug #40502 (ext/interbase compile failure). (Tony) +- Fixed bug #40286 (PHP fastcgi with PHP_FCGI_CHILDREN don't kill children when + parent is killed). (Dmitry) 14 Feb 2007, Version 4.4.5 - Upgraded PEAR to 1.5.0. (Greg) http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.190.2.68.2.7r2=1.190.2.68.2.8diff_format=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.190.2.68.2.7 php-src/sapi/cgi/cgi_main.c:1.190.2.68.2.8 --- php-src/sapi/cgi/cgi_main.c:1.190.2.68.2.7 Mon Jan 1 09:46:51 2007 +++ php-src/sapi/cgi/cgi_main.c Fri Feb 16 11:47:20 2007 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: cgi_main.c,v 1.190.2.68.2.7 2007/01/01 09:46:51 sebastian Exp $ */ +/* $Id: cgi_main.c,v 1.190.2.68.2.8 2007/02/16 11:47:20 dmitry Exp $ */ #include php.h #include php_globals.h @@ -351,18 +351,14 @@ static int sapi_cgi_read_post(char *buffer, uint count_bytes TSRMLS_DC) { - uint read_bytes=0, tmp_read_bytes; -#if PHP_FASTCGI - char *pos = buffer; -#endif + int read_bytes=0, tmp_read_bytes; count_bytes = MIN(count_bytes, (uint)SG(request_info).content_length-SG(read_post_bytes)); while (read_bytes count_bytes) { #if PHP_FASTCGI if (!FCGX_IsCGI()) { FCGX_Request *request = (FCGX_Request *)SG(server_context); - tmp_read_bytes = FCGX_GetStr( pos, count_bytes-read_bytes, request-in ); - pos += tmp_read_bytes; + tmp_read_bytes = FCGX_GetStr(buffer+read_bytes, count_bytes-read_bytes, request-in ); } else { tmp_read_bytes = read(0, buffer+read_bytes, count_bytes-read_bytes); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard assert.c basic_functions.c
dmitry Fri Feb 16 13:12:10 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard assert.c basic_functions.c Log: Fixed return value of assert_options(ASSERT_CALLBACK) and possible crash (Andy Wharmby) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/assert.c?r1=1.60.2.3.2.4r2=1.60.2.3.2.5diff_format=u Index: php-src/ext/standard/assert.c diff -u php-src/ext/standard/assert.c:1.60.2.3.2.4 php-src/ext/standard/assert.c:1.60.2.3.2.5 --- php-src/ext/standard/assert.c:1.60.2.3.2.4 Mon Jan 1 09:36:08 2007 +++ php-src/ext/standard/assert.c Fri Feb 16 13:12:10 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: assert.c,v 1.60.2.3.2.4 2007/01/01 09:36:08 sebastian Exp $ */ +/* $Id: assert.c,v 1.60.2.3.2.5 2007/02/16 13:12:10 dmitry Exp $ */ /* {{{ includes/startup/misc */ @@ -114,6 +114,16 @@ return SUCCESS; } +PHP_RINIT_FUNCTION(assert) +{ + if (ASSERTG(cb)) { + MAKE_STD_ZVAL(ASSERTG(callback)); + ZVAL_STRING(ASSERTG(callback), ASSERTG(cb), 1); + } + + return SUCCESS; +} + PHP_RSHUTDOWN_FUNCTION(assert) { if (ASSERTG(callback)) { @@ -187,11 +197,6 @@ RETURN_TRUE; } - if (!ASSERTG(callback) ASSERTG(cb)) { - MAKE_STD_ZVAL(ASSERTG(callback)); - ZVAL_STRING(ASSERTG(callback), ASSERTG(cb), 1); - } - if (ASSERTG(callback)) { zval *args[3]; zval *retval; @@ -286,6 +291,11 @@ break; case ASSERT_CALLBACK: + if (ASSERTG(callback) != NULL) { + RETVAL_ZVAL(ASSERTG(callback), 1, 0); + } else { + RETVAL_NULL(); + } if (ac == 2) { if (ASSERTG(callback)) { zval_ptr_dtor(ASSERTG(callback)); @@ -293,7 +303,7 @@ ASSERTG(callback) = *value; zval_add_ref(value); } - RETURN_TRUE; + return; break; default: http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.39r2=1.725.2.31.2.40diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.39 php-src/ext/standard/basic_functions.c:1.725.2.31.2.40 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.39 Mon Jan 1 09:36:08 2007 +++ php-src/ext/standard/basic_functions.c Fri Feb 16 13:12:10 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.39 2007/01/01 09:36:08 sebastian Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.40 2007/02/16 13:12:10 dmitry Exp $ */ #include php.h #include php_streams.h @@ -4132,6 +4132,7 @@ #ifdef HAVE_SYSLOG_H PHP_RINIT(syslog)(INIT_FUNC_ARGS_PASSTHRU); #endif + PHP_RINIT(assert) (INIT_FUNC_ARGS_PASSTHRU); PHP_RINIT(dir)(INIT_FUNC_ARGS_PASSTHRU); PHP_RINIT(url_scanner_ex)(INIT_FUNC_ARGS_PASSTHRU); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard assert.c basic_functions.c
dmitry Fri Feb 16 13:12:55 2007 UTC Modified files: /php-src/ext/standard assert.c basic_functions.c Log: Fixed return value of assert_options(ASSERT_CALLBACK) and possible crash (Andy Wharmby) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/assert.c?r1=1.71r2=1.72diff_format=u Index: php-src/ext/standard/assert.c diff -u php-src/ext/standard/assert.c:1.71 php-src/ext/standard/assert.c:1.72 --- php-src/ext/standard/assert.c:1.71 Mon Jan 1 09:29:30 2007 +++ php-src/ext/standard/assert.c Fri Feb 16 13:12:55 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: assert.c,v 1.71 2007/01/01 09:29:30 sebastian Exp $ */ +/* $Id: assert.c,v 1.72 2007/02/16 13:12:55 dmitry Exp $ */ /* {{{ includes/startup/misc */ @@ -114,6 +114,16 @@ return SUCCESS; } +PHP_RINIT_FUNCTION(assert) +{ + if (ASSERTG(cb)) { + MAKE_STD_ZVAL(ASSERTG(callback)); + ZVAL_STRING(ASSERTG(callback), ASSERTG(cb), 1); + } + + return SUCCESS; +} + PHP_RSHUTDOWN_FUNCTION(assert) { if (ASSERTG(callback)) { @@ -202,11 +212,6 @@ RETURN_TRUE; } - if (!ASSERTG(callback) ASSERTG(cb)) { - MAKE_STD_ZVAL(ASSERTG(callback)); - ZVAL_STRING(ASSERTG(callback), ASSERTG(cb), 1); - } - if (ASSERTG(callback)) { zval *args[3]; zval *retval; @@ -309,6 +314,11 @@ break; case ASSERT_CALLBACK: + if (ASSERTG(callback) != NULL) { + RETVAL_ZVAL(ASSERTG(callback), 1, 0); + } else { + RETVAL_NULL(); + } if (ac == 2) { if (ASSERTG(callback)) { zval_ptr_dtor(ASSERTG(callback)); @@ -316,7 +326,7 @@ ASSERTG(callback) = *value; zval_add_ref(value); } - RETURN_TRUE; + return; break; default: http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.846r2=1.847diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.846 php-src/ext/standard/basic_functions.c:1.847 --- php-src/ext/standard/basic_functions.c:1.846Thu Feb 8 15:31:01 2007 +++ php-src/ext/standard/basic_functions.c Fri Feb 16 13:12:55 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.846 2007/02/08 15:31:01 helly Exp $ */ +/* $Id: basic_functions.c,v 1.847 2007/02/16 13:12:55 dmitry Exp $ */ #include php.h #include php_streams.h @@ -4147,6 +4147,7 @@ #ifdef HAVE_SYSLOG_H PHP_RINIT(syslog)(INIT_FUNC_ARGS_PASSTHRU); #endif + PHP_RINIT(assert) (INIT_FUNC_ARGS_PASSTHRU); PHP_RINIT(dir)(INIT_FUNC_ARGS_PASSTHRU); PHP_RINIT(url_scanner_ex)(INIT_FUNC_ARGS_PASSTHRU); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/imap php_imap.c
tony2001Fri Feb 16 13:28:03 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/imap php_imap.c Log: fix possible double free http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.208.2.7.2.18r2=1.208.2.7.2.19diff_format=u Index: php-src/ext/imap/php_imap.c diff -u php-src/ext/imap/php_imap.c:1.208.2.7.2.18 php-src/ext/imap/php_imap.c:1.208.2.7.2.19 --- php-src/ext/imap/php_imap.c:1.208.2.7.2.18 Fri Feb 16 03:32:06 2007 +++ php-src/ext/imap/php_imap.c Fri Feb 16 13:28:03 2007 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: php_imap.c,v 1.208.2.7.2.18 2007/02/16 03:32:06 iliaa Exp $ */ +/* $Id: php_imap.c,v 1.208.2.7.2.19 2007/02/16 13:28:03 tony2001 Exp $ */ #define IMAP41 @@ -2215,7 +2215,7 @@ if (dest.data) { free(dest.data); } - if (src.data) { + if (src.data src.data != dest.data) { free(src.data); } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/imap php_imap.c
tony2001Fri Feb 16 13:28:32 2007 UTC Modified files: /php-src/ext/imap php_imap.c Log: MFB: fix leak http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.235r2=1.236diff_format=u Index: php-src/ext/imap/php_imap.c diff -u php-src/ext/imap/php_imap.c:1.235 php-src/ext/imap/php_imap.c:1.236 --- php-src/ext/imap/php_imap.c:1.235 Thu Jan 18 14:03:24 2007 +++ php-src/ext/imap/php_imap.c Fri Feb 16 13:28:32 2007 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: php_imap.c,v 1.235 2007/01/18 14:03:24 tony2001 Exp $ */ +/* $Id: php_imap.c,v 1.236 2007/02/16 13:28:32 tony2001 Exp $ */ #define IMAP41 @@ -2211,6 +2211,9 @@ if (dest.data) { free(dest.data); } + if (src.data src.data != dest.data) { + free(src.data); + } } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/standard assert.c basic_functions.c
Dmitry, Please revert this patch. The code adds RINIT that hits every request for functionality that is only needed for testing of the code and is otherwise rarely used. I do not believe it warrants slowing down every single request, even by a little bit. On 16-Feb-07, at 8:12 AM, Dmitry Stogov wrote: dmitry Fri Feb 16 13:12:55 2007 UTC Modified files: /php-src/ext/standard assert.c basic_functions.c Log: Fixed return value of assert_options(ASSERT_CALLBACK) and possible crash (Andy Wharmby) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/assert.c? r1=1.71r2=1.72diff_format=u Index: php-src/ext/standard/assert.c diff -u php-src/ext/standard/assert.c:1.71 php-src/ext/standard/ assert.c:1.72 --- php-src/ext/standard/assert.c:1.71 Mon Jan 1 09:29:30 2007 +++ php-src/ext/standard/assert.c Fri Feb 16 13:12:55 2007 @@ -16,7 +16,7 @@ +- -+ */ -/* $Id: assert.c,v 1.71 2007/01/01 09:29:30 sebastian Exp $ */ +/* $Id: assert.c,v 1.72 2007/02/16 13:12:55 dmitry Exp $ */ /* {{{ includes/startup/misc */ @@ -114,6 +114,16 @@ return SUCCESS; } +PHP_RINIT_FUNCTION(assert) +{ + if (ASSERTG(cb)) { + MAKE_STD_ZVAL(ASSERTG(callback)); + ZVAL_STRING(ASSERTG(callback), ASSERTG(cb), 1); + } + + return SUCCESS; +} + PHP_RSHUTDOWN_FUNCTION(assert) { if (ASSERTG(callback)) { @@ -202,11 +212,6 @@ RETURN_TRUE; } - if (!ASSERTG(callback) ASSERTG(cb)) { - MAKE_STD_ZVAL(ASSERTG(callback)); - ZVAL_STRING(ASSERTG(callback), ASSERTG(cb), 1); - } - if (ASSERTG(callback)) { zval *args[3]; zval *retval; @@ -309,6 +314,11 @@ break; case ASSERT_CALLBACK: + if (ASSERTG(callback) != NULL) { + RETVAL_ZVAL(ASSERTG(callback), 1, 0); + } else { + RETVAL_NULL(); + } if (ac == 2) { if (ASSERTG(callback)) { zval_ptr_dtor(ASSERTG(callback)); @@ -316,7 +326,7 @@ ASSERTG(callback) = *value; zval_add_ref(value); } - RETURN_TRUE; + return; break; default: http://cvs.php.net/viewvc.cgi/php-src/ext/standard/ basic_functions.c?r1=1.846r2=1.847diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.846 php-src/ext/ standard/basic_functions.c:1.847 --- php-src/ext/standard/basic_functions.c:1.846 Thu Feb 8 15:31:01 2007 +++ php-src/ext/standard/basic_functions.c Fri Feb 16 13:12:55 2007 @@ -17,7 +17,7 @@ +- -+ */ -/* $Id: basic_functions.c,v 1.846 2007/02/08 15:31:01 helly Exp $ */ +/* $Id: basic_functions.c,v 1.847 2007/02/16 13:12:55 dmitry Exp $ */ #include php.h #include php_streams.h @@ -4147,6 +4147,7 @@ #ifdef HAVE_SYSLOG_H PHP_RINIT(syslog)(INIT_FUNC_ARGS_PASSTHRU); #endif + PHP_RINIT(assert) (INIT_FUNC_ARGS_PASSTHRU); PHP_RINIT(dir)(INIT_FUNC_ARGS_PASSTHRU); PHP_RINIT(url_scanner_ex)(INIT_FUNC_ARGS_PASSTHRU); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Ilia Alshanetsky -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/standard assert.c basic_functions.c
Ilia, hi, There's no way to query the current callback setting there. If RINIT's the only way to achieve it, and we can't have RINIT, the manual needs fixing to reflect reality. So - are you officially calling it a 'won't fix'? Or is there a less intrusive fix in the wings? (Read: I've no idea whether promoting OnChangeCallback to ZEND_INI_MH() would do the trick.) - Steph - Original Message - From: Ilia Alshanetsky [EMAIL PROTECTED] To: Dmitry Stogov [EMAIL PROTECTED] Cc: php-cvs@lists.php.net Sent: Friday, February 16, 2007 1:47 PM Subject: Re: [PHP-CVS] cvs: php-src /ext/standard assert.c basic_functions.c Dmitry, Please revert this patch. The code adds RINIT that hits every request for functionality that is only needed for testing of the code and is otherwise rarely used. I do not believe it warrants slowing down every single request, even by a little bit. On 16-Feb-07, at 8:12 AM, Dmitry Stogov wrote: dmitry Fri Feb 16 13:12:55 2007 UTC Modified files: /php-src/ext/standard assert.c basic_functions.c Log: Fixed return value of assert_options(ASSERT_CALLBACK) and possible crash (Andy Wharmby) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/assert.c? r1=1.71r2=1.72diff_format=u Index: php-src/ext/standard/assert.c diff -u php-src/ext/standard/assert.c:1.71 php-src/ext/standard/ assert.c:1.72 --- php-src/ext/standard/assert.c:1.71 Mon Jan 1 09:29:30 2007 +++ php-src/ext/standard/assert.c Fri Feb 16 13:12:55 2007 @@ -16,7 +16,7 @@ +- -+ */ -/* $Id: assert.c,v 1.71 2007/01/01 09:29:30 sebastian Exp $ */ +/* $Id: assert.c,v 1.72 2007/02/16 13:12:55 dmitry Exp $ */ /* {{{ includes/startup/misc */ @@ -114,6 +114,16 @@ return SUCCESS; } +PHP_RINIT_FUNCTION(assert) +{ + if (ASSERTG(cb)) { + MAKE_STD_ZVAL(ASSERTG(callback)); + ZVAL_STRING(ASSERTG(callback), ASSERTG(cb), 1); + } + + return SUCCESS; +} + PHP_RSHUTDOWN_FUNCTION(assert) { if (ASSERTG(callback)) { @@ -202,11 +212,6 @@ RETURN_TRUE; } - if (!ASSERTG(callback) ASSERTG(cb)) { - MAKE_STD_ZVAL(ASSERTG(callback)); - ZVAL_STRING(ASSERTG(callback), ASSERTG(cb), 1); - } - if (ASSERTG(callback)) { zval *args[3]; zval *retval; @@ -309,6 +314,11 @@ break; case ASSERT_CALLBACK: + if (ASSERTG(callback) != NULL) { + RETVAL_ZVAL(ASSERTG(callback), 1, 0); + } else { + RETVAL_NULL(); + } if (ac == 2) { if (ASSERTG(callback)) { zval_ptr_dtor(ASSERTG(callback)); @@ -316,7 +326,7 @@ ASSERTG(callback) = *value; zval_add_ref(value); } - RETURN_TRUE; + return; break; default: http://cvs.php.net/viewvc.cgi/php-src/ext/standard/ basic_functions.c?r1=1.846r2=1.847diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.846 php-src/ext/ standard/basic_functions.c:1.847 --- php-src/ext/standard/basic_functions.c:1.846 Thu Feb 8 15:31:01 2007 +++ php-src/ext/standard/basic_functions.c Fri Feb 16 13:12:55 2007 @@ -17,7 +17,7 @@ +- -+ */ -/* $Id: basic_functions.c,v 1.846 2007/02/08 15:31:01 helly Exp $ */ +/* $Id: basic_functions.c,v 1.847 2007/02/16 13:12:55 dmitry Exp $ */ #include php.h #include php_streams.h @@ -4147,6 +4147,7 @@ #ifdef HAVE_SYSLOG_H PHP_RINIT(syslog)(INIT_FUNC_ARGS_PASSTHRU); #endif + PHP_RINIT(assert) (INIT_FUNC_ARGS_PASSTHRU); PHP_RINIT(dir)(INIT_FUNC_ARGS_PASSTHRU); PHP_RINIT(url_scanner_ex)(INIT_FUNC_ARGS_PASSTHRU); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Ilia Alshanetsky -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/standard assert.c basic_functions.c
On 16-Feb-07, at 9:55 AM, Steph Fox wrote: Ilia, hi, There's no way to query the current callback setting there. If RINIT's the only way to achieve it, and we can't have RINIT, the manual needs fixing to reflect reality. So - are you officially calling it a 'won't fix'?' yes! I already did it inside the bug report. Ilia Alshanetsky -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-CVS] cvs: php-src /ext/standard assert.c basic_functions.c
Really this patch fixes a SIGSEGV. I'll try to look how to optimize it. Thanks. Dmitry. -Original Message- From: Ilia Alshanetsky [mailto:[EMAIL PROTECTED] Sent: Friday, February 16, 2007 4:47 PM To: Dmitry Stogov Cc: php-cvs@lists.php.net Subject: Re: [PHP-CVS] cvs: php-src /ext/standard assert.c basic_functions.c Dmitry, Please revert this patch. The code adds RINIT that hits every request for functionality that is only needed for testing of the code and is otherwise rarely used. I do not believe it warrants slowing down every single request, even by a little bit. On 16-Feb-07, at 8:12 AM, Dmitry Stogov wrote: dmitry Fri Feb 16 13:12:55 2007 UTC Modified files: /php-src/ext/standard assert.c basic_functions.c Log: Fixed return value of assert_options(ASSERT_CALLBACK) and possible crash (Andy Wharmby) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/assert.c? r1=1.71r2=1.72diff_format=u Index: php-src/ext/standard/assert.c diff -u php-src/ext/standard/assert.c:1.71 php-src/ext/standard/ assert.c:1.72 --- php-src/ext/standard/assert.c:1.71 Mon Jan 1 09:29:30 2007 +++ php-src/ext/standard/assert.c Fri Feb 16 13:12:55 2007 @@ -16,7 +16,7 @@ +- -+ */ -/* $Id: assert.c,v 1.71 2007/01/01 09:29:30 sebastian Exp $ */ +/* $Id: assert.c,v 1.72 2007/02/16 13:12:55 dmitry Exp $ */ /* {{{ includes/startup/misc */ @@ -114,6 +114,16 @@ return SUCCESS; } +PHP_RINIT_FUNCTION(assert) +{ + if (ASSERTG(cb)) { + MAKE_STD_ZVAL(ASSERTG(callback)); + ZVAL_STRING(ASSERTG(callback), ASSERTG(cb), 1); + } + + return SUCCESS; +} + PHP_RSHUTDOWN_FUNCTION(assert) { if (ASSERTG(callback)) { @@ -202,11 +212,6 @@ RETURN_TRUE; } - if (!ASSERTG(callback) ASSERTG(cb)) { - MAKE_STD_ZVAL(ASSERTG(callback)); - ZVAL_STRING(ASSERTG(callback), ASSERTG(cb), 1); - } - if (ASSERTG(callback)) { zval *args[3]; zval *retval; @@ -309,6 +314,11 @@ break; case ASSERT_CALLBACK: + if (ASSERTG(callback) != NULL) { + RETVAL_ZVAL(ASSERTG(callback), 1, 0); + } else { + RETVAL_NULL(); + } if (ac == 2) { if (ASSERTG(callback)) { zval_ptr_dtor(ASSERTG(callback)); @@ -316,7 +326,7 @@ ASSERTG(callback) = *value; zval_add_ref(value); } - RETURN_TRUE; + return; break; default: http://cvs.php.net/viewvc.cgi/php-src/ext/standard/ basic_functions.c?r1=1.846r2=1.847diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.846 php-src/ext/ standard/basic_functions.c:1.847 --- php-src/ext/standard/basic_functions.c:1.846Thu Feb 8 15:31:01 2007 +++ php-src/ext/standard/basic_functions.c Fri Feb 16 13:12:55 2007 @@ -17,7 +17,7 @@ +- -+ */ -/* $Id: basic_functions.c,v 1.846 2007/02/08 15:31:01 helly Exp $ */ +/* $Id: basic_functions.c,v 1.847 2007/02/16 13:12:55 dmitry Exp $ */ #include php.h #include php_streams.h @@ -4147,6 +4147,7 @@ #ifdef HAVE_SYSLOG_H PHP_RINIT(syslog)(INIT_FUNC_ARGS_PASSTHRU); #endif + PHP_RINIT(assert) (INIT_FUNC_ARGS_PASSTHRU); PHP_RINIT(dir)(INIT_FUNC_ARGS_PASSTHRU); PHP_RINIT(url_scanner_ex)(INIT_FUNC_ARGS_PASSTHRU); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Ilia Alshanetsky -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/standard assert.c basic_functions.c
So where is the test? *hint* :-) - Original Message - Really this patch fixes a SIGSEGV. I'll try to look how to optimize it. Thanks. Dmitry. -Original Message- From: Ilia Alshanetsky [mailto:[EMAIL PROTECTED] Sent: Friday, February 16, 2007 4:47 PM To: Dmitry Stogov Cc: php-cvs@lists.php.net Subject: Re: [PHP-CVS] cvs: php-src /ext/standard assert.c basic_functions.c Dmitry, Please revert this patch. The code adds RINIT that hits every request for functionality that is only needed for testing of the code and is otherwise rarely used. I do not believe it warrants slowing down every single request, even by a little bit. On 16-Feb-07, at 8:12 AM, Dmitry Stogov wrote: dmitry Fri Feb 16 13:12:55 2007 UTC Modified files: /php-src/ext/standard assert.c basic_functions.c Log: Fixed return value of assert_options(ASSERT_CALLBACK) and possible crash (Andy Wharmby) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/assert.c? r1=1.71r2=1.72diff_format=u Index: php-src/ext/standard/assert.c diff -u php-src/ext/standard/assert.c:1.71 php-src/ext/standard/ assert.c:1.72 --- php-src/ext/standard/assert.c:1.71 Mon Jan 1 09:29:30 2007 +++ php-src/ext/standard/assert.c Fri Feb 16 13:12:55 2007 @@ -16,7 +16,7 @@ +- -+ */ -/* $Id: assert.c,v 1.71 2007/01/01 09:29:30 sebastian Exp $ */ +/* $Id: assert.c,v 1.72 2007/02/16 13:12:55 dmitry Exp $ */ /* {{{ includes/startup/misc */ @@ -114,6 +114,16 @@ return SUCCESS; } +PHP_RINIT_FUNCTION(assert) +{ + if (ASSERTG(cb)) { + MAKE_STD_ZVAL(ASSERTG(callback)); + ZVAL_STRING(ASSERTG(callback), ASSERTG(cb), 1); + } + + return SUCCESS; +} + PHP_RSHUTDOWN_FUNCTION(assert) { if (ASSERTG(callback)) { @@ -202,11 +212,6 @@ RETURN_TRUE; } - if (!ASSERTG(callback) ASSERTG(cb)) { - MAKE_STD_ZVAL(ASSERTG(callback)); - ZVAL_STRING(ASSERTG(callback), ASSERTG(cb), 1); - } - if (ASSERTG(callback)) { zval *args[3]; zval *retval; @@ -309,6 +314,11 @@ break; case ASSERT_CALLBACK: + if (ASSERTG(callback) != NULL) { + RETVAL_ZVAL(ASSERTG(callback), 1, 0); + } else { + RETVAL_NULL(); + } if (ac == 2) { if (ASSERTG(callback)) { zval_ptr_dtor(ASSERTG(callback)); @@ -316,7 +326,7 @@ ASSERTG(callback) = *value; zval_add_ref(value); } - RETURN_TRUE; + return; break; default: http://cvs.php.net/viewvc.cgi/php-src/ext/standard/ basic_functions.c?r1=1.846r2=1.847diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.846 php-src/ext/ standard/basic_functions.c:1.847 --- php-src/ext/standard/basic_functions.c:1.846 Thu Feb 8 15:31:01 2007 +++ php-src/ext/standard/basic_functions.c Fri Feb 16 13:12:55 2007 @@ -17,7 +17,7 @@ +- -+ */ -/* $Id: basic_functions.c,v 1.846 2007/02/08 15:31:01 helly Exp $ */ +/* $Id: basic_functions.c,v 1.847 2007/02/16 13:12:55 dmitry Exp $ */ #include php.h #include php_streams.h @@ -4147,6 +4147,7 @@ #ifdef HAVE_SYSLOG_H PHP_RINIT(syslog)(INIT_FUNC_ARGS_PASSTHRU); #endif + PHP_RINIT(assert) (INIT_FUNC_ARGS_PASSTHRU); PHP_RINIT(dir)(INIT_FUNC_ARGS_PASSTHRU); PHP_RINIT(url_scanner_ex)(INIT_FUNC_ARGS_PASSTHRU); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Ilia Alshanetsky -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard assert.c basic_functions.c
dmitry Fri Feb 16 16:33:37 2007 UTC Modified files: /php-src/ext/standard assert.c basic_functions.c Log: Optimize out RINIT() http://cvs.php.net/viewvc.cgi/php-src/ext/standard/assert.c?r1=1.72r2=1.73diff_format=u Index: php-src/ext/standard/assert.c diff -u php-src/ext/standard/assert.c:1.72 php-src/ext/standard/assert.c:1.73 --- php-src/ext/standard/assert.c:1.72 Fri Feb 16 13:12:55 2007 +++ php-src/ext/standard/assert.c Fri Feb 16 16:33:37 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: assert.c,v 1.72 2007/02/16 13:12:55 dmitry Exp $ */ +/* $Id: assert.c,v 1.73 2007/02/16 16:33:37 dmitry Exp $ */ /* {{{ includes/startup/misc */ @@ -114,16 +114,6 @@ return SUCCESS; } -PHP_RINIT_FUNCTION(assert) -{ - if (ASSERTG(cb)) { - MAKE_STD_ZVAL(ASSERTG(callback)); - ZVAL_STRING(ASSERTG(callback), ASSERTG(cb), 1); - } - - return SUCCESS; -} - PHP_RSHUTDOWN_FUNCTION(assert) { if (ASSERTG(callback)) { @@ -212,6 +202,11 @@ RETURN_TRUE; } + if (!ASSERTG(callback) ASSERTG(cb)) { + MAKE_STD_ZVAL(ASSERTG(callback)); + ZVAL_STRING(ASSERTG(callback), ASSERTG(cb), 1); + } + if (ASSERTG(callback)) { zval *args[3]; zval *retval; @@ -316,6 +311,8 @@ case ASSERT_CALLBACK: if (ASSERTG(callback) != NULL) { RETVAL_ZVAL(ASSERTG(callback), 1, 0); + } else if (ASSERTG(cb)) { + RETVAL_STRING(ASSERTG(cb), 1); } else { RETVAL_NULL(); } http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.847r2=1.848diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.847 php-src/ext/standard/basic_functions.c:1.848 --- php-src/ext/standard/basic_functions.c:1.847Fri Feb 16 13:12:55 2007 +++ php-src/ext/standard/basic_functions.c Fri Feb 16 16:33:37 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.847 2007/02/16 13:12:55 dmitry Exp $ */ +/* $Id: basic_functions.c,v 1.848 2007/02/16 16:33:37 dmitry Exp $ */ #include php.h #include php_streams.h @@ -4147,7 +4147,6 @@ #ifdef HAVE_SYSLOG_H PHP_RINIT(syslog)(INIT_FUNC_ARGS_PASSTHRU); #endif - PHP_RINIT(assert) (INIT_FUNC_ARGS_PASSTHRU); PHP_RINIT(dir)(INIT_FUNC_ARGS_PASSTHRU); PHP_RINIT(url_scanner_ex)(INIT_FUNC_ARGS_PASSTHRU); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard assert.c basic_functions.c
dmitry Fri Feb 16 16:35:04 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard assert.c basic_functions.c Log: Optimize out RINIT() http://cvs.php.net/viewvc.cgi/php-src/ext/standard/assert.c?r1=1.60.2.3.2.5r2=1.60.2.3.2.6diff_format=u Index: php-src/ext/standard/assert.c diff -u php-src/ext/standard/assert.c:1.60.2.3.2.5 php-src/ext/standard/assert.c:1.60.2.3.2.6 --- php-src/ext/standard/assert.c:1.60.2.3.2.5 Fri Feb 16 13:12:10 2007 +++ php-src/ext/standard/assert.c Fri Feb 16 16:35:04 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: assert.c,v 1.60.2.3.2.5 2007/02/16 13:12:10 dmitry Exp $ */ +/* $Id: assert.c,v 1.60.2.3.2.6 2007/02/16 16:35:04 dmitry Exp $ */ /* {{{ includes/startup/misc */ @@ -114,16 +114,6 @@ return SUCCESS; } -PHP_RINIT_FUNCTION(assert) -{ - if (ASSERTG(cb)) { - MAKE_STD_ZVAL(ASSERTG(callback)); - ZVAL_STRING(ASSERTG(callback), ASSERTG(cb), 1); - } - - return SUCCESS; -} - PHP_RSHUTDOWN_FUNCTION(assert) { if (ASSERTG(callback)) { @@ -197,6 +187,11 @@ RETURN_TRUE; } + if (!ASSERTG(callback) ASSERTG(cb)) { + MAKE_STD_ZVAL(ASSERTG(callback)); + ZVAL_STRING(ASSERTG(callback), ASSERTG(cb), 1); + } + if (ASSERTG(callback)) { zval *args[3]; zval *retval; @@ -293,6 +288,8 @@ case ASSERT_CALLBACK: if (ASSERTG(callback) != NULL) { RETVAL_ZVAL(ASSERTG(callback), 1, 0); + } else if (ASSERTG(cb)) { + RETVAL_STRING(ASSERTG(cb), 1); } else { RETVAL_NULL(); } http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.40r2=1.725.2.31.2.41diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.40 php-src/ext/standard/basic_functions.c:1.725.2.31.2.41 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.40 Fri Feb 16 13:12:10 2007 +++ php-src/ext/standard/basic_functions.c Fri Feb 16 16:35:04 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.40 2007/02/16 13:12:10 dmitry Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.41 2007/02/16 16:35:04 dmitry Exp $ */ #include php.h #include php_streams.h @@ -4132,7 +4132,6 @@ #ifdef HAVE_SYSLOG_H PHP_RINIT(syslog)(INIT_FUNC_ARGS_PASSTHRU); #endif - PHP_RINIT(assert) (INIT_FUNC_ARGS_PASSTHRU); PHP_RINIT(dir)(INIT_FUNC_ARGS_PASSTHRU); PHP_RINIT(url_scanner_ex)(INIT_FUNC_ARGS_PASSTHRU); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-CVS] cvs: php-src /ext/standard assert.c basic_functions.c
I am not sure how I got a crash. :) Probably it wasn't related to this bug/fix, but it was a result of another bad fix for the same problem. Dmitry. -Original Message- From: Nuno Lopes [mailto:[EMAIL PROTECTED] Sent: Friday, February 16, 2007 7:28 PM To: Dmitry Stogov; 'Ilia Alshanetsky' Cc: php-cvs@lists.php.net Subject: Re: [PHP-CVS] cvs: php-src /ext/standard assert.c basic_functions.c So where is the test? *hint* :-) - Original Message - Really this patch fixes a SIGSEGV. I'll try to look how to optimize it. Thanks. Dmitry. -Original Message- From: Ilia Alshanetsky [mailto:[EMAIL PROTECTED] Sent: Friday, February 16, 2007 4:47 PM To: Dmitry Stogov Cc: php-cvs@lists.php.net Subject: Re: [PHP-CVS] cvs: php-src /ext/standard assert.c basic_functions.c Dmitry, Please revert this patch. The code adds RINIT that hits every request for functionality that is only needed for testing of the code and is otherwise rarely used. I do not believe it warrants slowing down every single request, even by a little bit. On 16-Feb-07, at 8:12 AM, Dmitry Stogov wrote: dmitry Fri Feb 16 13:12:55 2007 UTC Modified files: /php-src/ext/standard assert.c basic_functions.c Log: Fixed return value of assert_options(ASSERT_CALLBACK) and possible crash (Andy Wharmby) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/assert.c? r1=1.71r2=1.72diff_format=u Index: php-src/ext/standard/assert.c diff -u php-src/ext/standard/assert.c:1.71 php-src/ext/standard/ assert.c:1.72 --- php-src/ext/standard/assert.c:1.71 Mon Jan 1 09:29:30 2007 +++ php-src/ext/standard/assert.c Fri Feb 16 13:12:55 2007 @@ -16,7 +16,7 @@ +- -+ */ -/* $Id: assert.c,v 1.71 2007/01/01 09:29:30 sebastian Exp $ */ +/* $Id: assert.c,v 1.72 2007/02/16 13:12:55 dmitry Exp $ */ /* {{{ includes/startup/misc */ @@ -114,6 +114,16 @@ return SUCCESS; } +PHP_RINIT_FUNCTION(assert) +{ + if (ASSERTG(cb)) { + MAKE_STD_ZVAL(ASSERTG(callback)); ZVAL_STRING(ASSERTG(callback), +ASSERTG(cb), 1); } + + return SUCCESS; +} + PHP_RSHUTDOWN_FUNCTION(assert) { if (ASSERTG(callback)) { @@ -202,11 +212,6 @@ RETURN_TRUE; } - if (!ASSERTG(callback) ASSERTG(cb)) { - MAKE_STD_ZVAL(ASSERTG(callback)); - ZVAL_STRING(ASSERTG(callback), ASSERTG(cb), 1); - } - if (ASSERTG(callback)) { zval *args[3]; zval *retval; @@ -309,6 +314,11 @@ break; case ASSERT_CALLBACK: + if (ASSERTG(callback) != NULL) { RETVAL_ZVAL(ASSERTG(callback), + 1, 0); } else { + RETVAL_NULL(); + } if (ac == 2) { if (ASSERTG(callback)) { zval_ptr_dtor(ASSERTG(callback)); @@ -316,7 +326,7 @@ ASSERTG(callback) = *value; zval_add_ref(value); } - RETURN_TRUE; + return; break; default: http://cvs.php.net/viewvc.cgi/php-src/ext/standard/ basic_functions.c?r1=1.846r2=1.847diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.846 php-src/ext/ standard/basic_functions.c:1.847 --- php-src/ext/standard/basic_functions.c:1.846 Thu Feb 8 15:31:01 2007 +++ php-src/ext/standard/basic_functions.c Fri Feb 16 13:12:55 2007 @@ -17,7 +17,7 @@ +- -+ */ -/* $Id: basic_functions.c,v 1.846 2007/02/08 15:31:01 helly Exp $ */ +/* $Id: basic_functions.c,v 1.847 2007/02/16 13:12:55 dmitry Exp $ */ #include php.h #include php_streams.h @@ -4147,6 +4147,7 @@ #ifdef HAVE_SYSLOG_H PHP_RINIT(syslog)(INIT_FUNC_ARGS_PASSTHRU); #endif + PHP_RINIT(assert) (INIT_FUNC_ARGS_PASSTHRU); PHP_RINIT(dir)(INIT_FUNC_ARGS_PASSTHRU); PHP_RINIT(url_scanner_ex)(INIT_FUNC_ARGS_PASSTHRU); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Ilia Alshanetsky -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: CVSROOT / avail
pajoye Fri Feb 16 17:22:36 2007 UTC Modified files: /CVSROOTavail Log: - joeaccord phpdoc karma http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1244r2=1.1245diff_format=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.1244 CVSROOT/avail:1.1245 --- CVSROOT/avail:1.1244Wed Feb 14 10:40:06 2007 +++ CVSROOT/avail Fri Feb 16 17:22:35 2007 @@ -40,7 +40,7 @@ # The PHP Documentation Group maintains the documentation and its # translations. -avail|jmertic,bobby,takagi,gcc,cem,mfp,ansriniv,jsgoupil,mazzanet,dbs,frogger,coldocean,alan_k,fleaslob,torben,lynch,kk,ted,paul,mbritton,coar,joey,bibi,mrobinso,perugini,tzwenny,hirokawa,drews,paulsen,hartmann,leon,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,goba,samesch,jon,soneca,ronabop,glace,latoserver,rafael,jan,jcmeloni,chrullrich,mk,sebastian,troels,mathieu,phaethon,mj,corean,pandach,cycle98,vizvil,regina,cynic,jpm,dams,karoora,pcraft,suvia,zak,zimt,jmoore,ftfuture,ag315,bbonev,afortaleza,neotron,cg,delrom,jkj,hellekin,kgergely,cnewbill,fuzzy74,bjoern,fams,smasiello,dim,lucasr,cpereira,ernani,theseer,noribsd,subjective,ufux,hadar_p,asautins,dbenson,aleczapka,tom,amiller,cortesi,rarruda,betz,philip,alindeman,thyla,cucinato,zyprexia,tpug,mitja,conni,sts,georg,nmav,subbie,leszek,spheroid,slawek,alan_dangelo,ae,nohn,kaser01,visualmind,kurtz,luk,tronic,moh,bernd,yohgaki,fujimoto,gerzson,webler,spooky,cece,daniel,boo,nhoizey,joerg,imajes,hakan,chief97! 7,shlomi,raful,yuval,tomer,barak,ido,mork,lior,gal,adiju,cr_depend,florian,kappu,muricaru,dt,critix,ck,costra,fancao0515,tibee,eriksson,wenz,bs,anderson,tal,sander,matroz,ave,adu,mmeier,wentzel,scaro,aspinei,lmaxcar,manuzhai,darvina,peter,maxim,romakhin,n0nick,attila,sagi,kai,microbrain,rhheo,shimi,k.schroeder,djworld,emil,lboshell,netholic,dmitry83,progcom,verdana,yincheng,surfmax,nicos,chregu,msopacua,bbd,cyril,gregory,hudzilla,klean,mignoni,wiesemann,xqi,mersal,zruya,sean,staybyte,aber_sabeel,alzahrani,thomaslio,sfox,jippie,antonio,ahxiao,akcakayaa,allhibi,aner,black,class007,digo,dima,dorons,eshare,hpop1,itay,juppie,mrmatrix,saad,thomasgm,xbite,tobsn,jome,analytik,outsider,heymarcel,asmodean,bader,elmaystro,sp,truelight,gnuhacker,_batman_,sachat,dallas,dejan,zer0fill,steve3d,lm92,bradmssw,tahani,victor,erica,simonh,phpman,mrphp,notarius,joseph,mmkhajah,mohammed,proton,klootz,takashima,leoca,ahmad,abobader,fboudot,wurm,hakawy,felix,ahmedss,mahrous2020,yorgo,gal_ga,abodiv! e,ama,andras,hassen,jkhdk,okamura,popov,xman,fernandoc,avenger,hwin,ti x,alrehawi_,liuming,ramysaweres,astone,shiflett,jaenecke,bdensley,adamchan,jingfs,murphy,potatotsang,the_q,jsheets,xelis,equerci,phpcatala,tofanini,umut,kriga,ray,royhuggins,logician,almanar,alexws,gonik,haiaw,lkwang_cn,shadowwulf,telecart,pongsakorn,naveed,shivas,tularis,angela,decorj,hitcho,kevinkee,nmee,thx1140,crotalus,didou,novotnyr,sil,traduim,gui,mgf,ivanr,michal,tsirman,momo,cysoft,firefox,kouber,mipac,muslem,tomysk,vemarkov,garth,lord_lele,stone,laacz,retnug,ernestyang,hatem,house,luisdaniel,nizar,nvivo,seth,tomh,danguer,adam,nio,wassago,beeven,colacino,zvaranka,cesarguru,chubu,dark2907,portoban,reven,wizzard,sywr,koendw83,rylin,webstudio,jsjohnst,dmanusset,et,pitiphan,mbr,cdalar,alrashoudi,hafid,enough,zhouhao007,jnorbi,lorenzohgh,denisr,coder03,jcclaros,thomas,freeman,rioter,jschultz,davey,belleto,jtacon,yuw,ohill,elfyn,noam,nathan,salman,cheezy,ene,rezaiqbal,purnomo,dufiga_php,ftp_geo,udhien,prio,luckyguy354,maf,handi,meme,satiri,maddankara,rildo,hd,ali,lpj,adhit! ama,engkongs,preilly,dave,marcelo,curt,fd,javi,mrmaster,fa,nlopess,vrana,apaxx,pjotrik,marduk,narcotia1234,enloma,trizo,xmadda,redshift,alifikri,coder,dodol_maniac,eflorin,adywarna,kyokpae,milans,lovchy,spermwhale,phaze,baoengb,derek,yannick,daan,xxiengb,ott,mg,kennyt,tomsommer,poz,zamolxe,bishmila,ph1,irchtml,rogamer,bortolini,sapfir,guru,ahmed,robinhood,sohli,amt,romain,hlecuanda,thessoro,nforbes,jolan,laze,bagilevi,young,shakaali,chokobo,portalufpa,teecee,blindman,holst,schst,mnv,sodhi,aidan,jellybob,lauer,shenkong,jad,robert,peterhuewe,ogre,techtonik,narigone,realtebo,krid,mclay,dasch,miwaniec,abdshomad,sammywg,aeoris,mez,jed,hsc,luckec,dmytton,choudesh,phpvcn,simp,michael,grantc,atex,katja,sthulbourn,mikl,kevinsz,roast,lsmith,tessus,gavinfo,rant,colder,ramsey,arkadius,bjori,erinet,omar,sixd,oliver,rquadling,timo,shadda|phpdoc,phpdoc-ar,phpdoc-bg,phpdoc-cs,phpdoc-da,phpdoc-de,phpdoc-el,phpdoc-es,phpdoc-fa_IR,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-id,ph! pdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR ,phpdoc-pt,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh,phpdoc-ca
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/calendar calendar.c
stasFri Feb 16 18:24:16 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/calendar calendar.c Log: increase hebdate buffer, use snprintf http://cvs.php.net/viewvc.cgi/php-src/ext/calendar/calendar.c?r1=1.46.2.2.2.2r2=1.46.2.2.2.3diff_format=u Index: php-src/ext/calendar/calendar.c diff -u php-src/ext/calendar/calendar.c:1.46.2.2.2.2 php-src/ext/calendar/calendar.c:1.46.2.2.2.3 --- php-src/ext/calendar/calendar.c:1.46.2.2.2.2Mon Jan 1 09:35:48 2007 +++ php-src/ext/calendar/calendar.c Fri Feb 16 18:24:16 2007 @@ -18,7 +18,7 @@ | Wez Furlong [EMAIL PROTECTED]| +--+ */ -/* $Id: calendar.c,v 1.46.2.2.2.2 2007/01/01 09:35:48 sebastian Exp $ */ +/* $Id: calendar.c,v 1.46.2.2.2.3 2007/02/16 18:24:16 stas Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -416,7 +416,7 @@ calendar-from_jd(jd, year, month, day); - sprintf(date, %i/%i/%i, month, day, year); + snprintf(date, sizeof(date)-1, %i/%i/%i, month, day, year); add_assoc_string(return_value, date, date, 1); add_assoc_long(return_value, month, month); @@ -447,7 +447,7 @@ } SdnToGregorian(julday, year, month, day); - sprintf(date, %i/%i/%i, month, day, year); + snprintf(date, sizeof(date)-1, %i/%i/%i, month, day, year); RETURN_STRING(date, 1); } @@ -480,7 +480,7 @@ } SdnToJulian(julday, year, month, day); - sprintf(date, %i/%i/%i, month, day, year); + snprintf(date, sizeof(date)-1, %i/%i/%i, month, day, year); RETURN_STRING(date, 1); } @@ -602,7 +602,7 @@ long julday, fl = 0; zend_bool heb = 0; int year, month, day; - char date[16], hebdate[25]; + char date[16], hebdate[32]; char *dayp, *yearp; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l|bl, julday, heb, fl) == FAILURE) { @@ -611,7 +611,7 @@ SdnToJewish(julday, year, month, day); if (!heb) { - sprintf(date, %i/%i/%i, month, day, year); + snprintf(date, sizeof(date)-1, %i/%i/%i, month, day, year); RETURN_STRING(date, 1); } else { if (year = 0 || year ) { @@ -619,7 +619,7 @@ RETURN_FALSE; } - sprintf(hebdate, %s %s %s, heb_number_to_chars(day, fl, dayp), JewishMonthHebName[month], heb_number_to_chars(year, fl, yearp)); + snprintf(hebdate, sizeof(hebdate)-1, %s %s %s, heb_number_to_chars(day, fl, dayp), JewishMonthHebName[month], heb_number_to_chars(year, fl, yearp)); if (dayp) { efree(dayp); @@ -661,7 +661,7 @@ } SdnToFrench(julday, year, month, day); - sprintf(date, %i/%i/%i, month, day, year); + snprintf(date, sizeof(date)-1, %i/%i/%i, month, day, year); RETURN_STRING(date, 1); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/calendar calendar.c
stasFri Feb 16 18:29:40 2007 UTC Modified files: /php-src/ext/calendar calendar.c Log: use snprintf, increase hebdate buffer http://cvs.php.net/viewvc.cgi/php-src/ext/calendar/calendar.c?r1=1.51r2=1.52diff_format=u Index: php-src/ext/calendar/calendar.c diff -u php-src/ext/calendar/calendar.c:1.51 php-src/ext/calendar/calendar.c:1.52 --- php-src/ext/calendar/calendar.c:1.51Mon Jan 1 09:29:21 2007 +++ php-src/ext/calendar/calendar.c Fri Feb 16 18:29:40 2007 @@ -18,7 +18,7 @@ | Wez Furlong [EMAIL PROTECTED]| +--+ */ -/* $Id: calendar.c,v 1.51 2007/01/01 09:29:21 sebastian Exp $ */ +/* $Id: calendar.c,v 1.52 2007/02/16 18:29:40 stas Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -416,7 +416,7 @@ calendar-from_jd(jd, year, month, day); - sprintf(date, %i/%i/%i, month, day, year); + snprintf(date, sizeof(date), %i/%i/%i, month, day, year); add_assoc_string(return_value, date, date, 1); add_assoc_long(return_value, month, month); @@ -447,7 +447,7 @@ } SdnToGregorian(julday, year, month, day); - sprintf(date, %i/%i/%i, month, day, year); + snprintf(date, sizeof(date), %i/%i/%i, month, day, year); RETURN_STRING(date, 1); } @@ -480,7 +480,7 @@ } SdnToJulian(julday, year, month, day); - sprintf(date, %i/%i/%i, month, day, year); + snprintf(date, sizeof(date), %i/%i/%i, month, day, year); RETURN_STRING(date, 1); } @@ -602,7 +602,7 @@ long julday, fl = 0; zend_bool heb = 0; int year, month, day; - char date[16], hebdate[25]; + char date[16], hebdate[32]; char *dayp, *yearp; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l|bl, julday, heb, fl) == FAILURE) { @@ -611,7 +611,7 @@ SdnToJewish(julday, year, month, day); if (!heb) { - sprintf(date, %i/%i/%i, month, day, year); + snprintf(date, sizeof(date), %i/%i/%i, month, day, year); RETURN_STRING(date, 1); } else { if (year = 0 || year ) { @@ -619,7 +619,7 @@ RETURN_FALSE; } - sprintf(hebdate, %s %s %s, heb_number_to_chars(day, fl, dayp), JewishMonthHebName[month], heb_number_to_chars(year, fl, yearp)); + snprintf(hebdate, sizeof(hebdate), %s %s %s, heb_number_to_chars(day, fl, dayp), JewishMonthHebName[month], heb_number_to_chars(year, fl, yearp)); if (dayp) { efree(dayp); @@ -661,7 +661,7 @@ } SdnToFrench(julday, year, month, day); - sprintf(date, %i/%i/%i, month, day, year); + snprintf(date, sizeof(date), %i/%i/%i, month, day, year); RETURN_STRING(date, 1); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/calendar calendar.c
stasFri Feb 16 18:32:38 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/calendar calendar.c Log: fix snprintf size #-1 is not needed http://cvs.php.net/viewvc.cgi/php-src/ext/calendar/calendar.c?r1=1.46.2.2.2.3r2=1.46.2.2.2.4diff_format=u Index: php-src/ext/calendar/calendar.c diff -u php-src/ext/calendar/calendar.c:1.46.2.2.2.3 php-src/ext/calendar/calendar.c:1.46.2.2.2.4 --- php-src/ext/calendar/calendar.c:1.46.2.2.2.3Fri Feb 16 18:24:16 2007 +++ php-src/ext/calendar/calendar.c Fri Feb 16 18:32:38 2007 @@ -18,7 +18,7 @@ | Wez Furlong [EMAIL PROTECTED]| +--+ */ -/* $Id: calendar.c,v 1.46.2.2.2.3 2007/02/16 18:24:16 stas Exp $ */ +/* $Id: calendar.c,v 1.46.2.2.2.4 2007/02/16 18:32:38 stas Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -416,7 +416,7 @@ calendar-from_jd(jd, year, month, day); - snprintf(date, sizeof(date)-1, %i/%i/%i, month, day, year); + snprintf(date, sizeof(date), %i/%i/%i, month, day, year); add_assoc_string(return_value, date, date, 1); add_assoc_long(return_value, month, month); @@ -447,7 +447,7 @@ } SdnToGregorian(julday, year, month, day); - snprintf(date, sizeof(date)-1, %i/%i/%i, month, day, year); + snprintf(date, sizeof(date), %i/%i/%i, month, day, year); RETURN_STRING(date, 1); } @@ -480,7 +480,7 @@ } SdnToJulian(julday, year, month, day); - snprintf(date, sizeof(date)-1, %i/%i/%i, month, day, year); + snprintf(date, sizeof(date), %i/%i/%i, month, day, year); RETURN_STRING(date, 1); } @@ -611,7 +611,7 @@ SdnToJewish(julday, year, month, day); if (!heb) { - snprintf(date, sizeof(date)-1, %i/%i/%i, month, day, year); + snprintf(date, sizeof(date), %i/%i/%i, month, day, year); RETURN_STRING(date, 1); } else { if (year = 0 || year ) { @@ -619,7 +619,7 @@ RETURN_FALSE; } - snprintf(hebdate, sizeof(hebdate)-1, %s %s %s, heb_number_to_chars(day, fl, dayp), JewishMonthHebName[month], heb_number_to_chars(year, fl, yearp)); + snprintf(hebdate, sizeof(hebdate), %s %s %s, heb_number_to_chars(day, fl, dayp), JewishMonthHebName[month], heb_number_to_chars(year, fl, yearp)); if (dayp) { efree(dayp); @@ -661,7 +661,7 @@ } SdnToFrench(julday, year, month, day); - snprintf(date, sizeof(date)-1, %i/%i/%i, month, day, year); + snprintf(date, sizeof(date), %i/%i/%i, month, day, year); RETURN_STRING(date, 1); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/mysqli mysqli.c
stasFri Feb 16 18:48:53 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/mysqli mysqli.c Log: use error message size http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli.c?r1=1.72.2.16.2.12r2=1.72.2.16.2.13diff_format=u Index: php-src/ext/mysqli/mysqli.c diff -u php-src/ext/mysqli/mysqli.c:1.72.2.16.2.12 php-src/ext/mysqli/mysqli.c:1.72.2.16.2.13 --- php-src/ext/mysqli/mysqli.c:1.72.2.16.2.12 Mon Jan 1 09:36:03 2007 +++ php-src/ext/mysqli/mysqli.c Fri Feb 16 18:48:53 2007 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli.c,v 1.72.2.16.2.12 2007/01/01 09:36:03 sebastian Exp $ + $Id: mysqli.c,v 1.72.2.16.2.13 2007/02/16 18:48:53 stas Exp $ */ #ifdef HAVE_CONFIG_H @@ -1130,10 +1130,10 @@ mysqli_local_infile *data = (mysqli_local_infile *) ptr; if (data) { - strcpy(error_msg, data-error_msg); + strlcpy(error_msg, data-error_msg, error_msg_len); return 2000; } - strcpy(error_msg, ER(CR_OUT_OF_MEMORY)); + strlcpy(error_msg, ER(CR_OUT_OF_MEMORY), error_msg_len); return CR_OUT_OF_MEMORY; } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mysqli mysqli.c
stasFri Feb 16 18:49:06 2007 UTC Modified files: /php-src/ext/mysqli mysqli.c Log: use error message size http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli.c?r1=1.101r2=1.102diff_format=u Index: php-src/ext/mysqli/mysqli.c diff -u php-src/ext/mysqli/mysqli.c:1.101 php-src/ext/mysqli/mysqli.c:1.102 --- php-src/ext/mysqli/mysqli.c:1.101 Mon Jan 1 09:29:25 2007 +++ php-src/ext/mysqli/mysqli.c Fri Feb 16 18:49:06 2007 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli.c,v 1.101 2007/01/01 09:29:25 sebastian Exp $ + $Id: mysqli.c,v 1.102 2007/02/16 18:49:06 stas Exp $ */ #ifdef HAVE_CONFIG_H @@ -1151,10 +1151,10 @@ mysqli_local_infile *data = (mysqli_local_infile *) ptr; if (data) { - strcpy(error_msg, data-error_msg); + strlcpy(error_msg, data-error_msg, error_msg_len); return 2000; } - strcpy(error_msg, ER(CR_OUT_OF_MEMORY)); + strlcpy(error_msg, ER(CR_OUT_OF_MEMORY), error_msg_len); return CR_OUT_OF_MEMORY; } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: CVSROOT / avail
pajoye Fri Feb 16 19:54:01 2007 UTC Modified files: /CVSROOTavail Log: - libgd karma for Mateusz Loskot http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1245r2=1.1246diff_format=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.1245 CVSROOT/avail:1.1246 --- CVSROOT/avail:1.1245Fri Feb 16 17:22:35 2007 +++ CVSROOT/avail Fri Feb 16 19:54:01 2007 @@ -401,6 +401,6 @@ # Please ask [EMAIL PROTECTED] before adding some unknown guys :) # gd/libgd is the library itself, other directories are for # the various tools (website, bugs,...) -avail|pajoye,edink,lhecking,jonas|gd +avail|pajoye,edink,lhecking,jonas,mloskot|gd # vim:set ft=conf sw=2 ts=2 et: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/pspell pspell.c
stasSat Feb 17 01:45:52 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/pspell pspell.c Log: use safer functions, check error value http://cvs.php.net/viewvc.cgi/php-src/ext/pspell/pspell.c?r1=1.45.2.4.2.5r2=1.45.2.4.2.6diff_format=u Index: php-src/ext/pspell/pspell.c diff -u php-src/ext/pspell/pspell.c:1.45.2.4.2.5 php-src/ext/pspell/pspell.c:1.45.2.4.2.6 --- php-src/ext/pspell/pspell.c:1.45.2.4.2.5Tue Jan 16 11:19:10 2007 +++ php-src/ext/pspell/pspell.c Sat Feb 17 01:45:52 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: pspell.c,v 1.45.2.4.2.5 2007/01/16 11:19:10 tony2001 Exp $ */ +/* $Id: pspell.c,v 1.45.2.4.2.6 2007/02/17 01:45:52 stas Exp $ */ #define IS_EXT_MODULE @@ -186,16 +186,19 @@ * pointing to the location of the dictionaries */ if(0 == RegOpenKey(HKEY_LOCAL_MACHINE, Software\\Aspell, hkey)) { + LONG result; dwLen = sizeof(aspell_dir) - 1; - RegQueryValueEx(hkey, , NULL, dwType, (LPBYTE)aspell_dir, dwLen); + result = RegQueryValueEx(hkey, , NULL, dwType, (LPBYTE)aspell_dir, dwLen); RegCloseKey(hkey); - strcpy(data_dir, aspell_dir); - strcat(data_dir, \\data); - strcpy(dict_dir, aspell_dir); - strcat(dict_dir, \\dict); + if(result == ERROR_SUCCESS) { + strlcpy(data_dir, aspell_dir, sizeof(data_dir)); + strlcat(data_dir, \\data, sizeof(data_dir)); + strlcpy(dict_dir, aspell_dir, sizeof(dict_dir)); + strlcat(dict_dir, \\dict, sizeof(dict_dir)); - pspell_config_replace(config, data-dir, data_dir); - pspell_config_replace(config, dict-dir, dict_dir); + pspell_config_replace(config, data-dir, data_dir); + pspell_config_replace(config, dict-dir, dict_dir); + } } #endif @@ -291,16 +294,19 @@ * pointing to the location of the dictionaries */ if(0 == RegOpenKey(HKEY_LOCAL_MACHINE, Software\\Aspell, hkey)) { + LONG result; dwLen = sizeof(aspell_dir) - 1; - RegQueryValueEx(hkey, , NULL, dwType, (LPBYTE)aspell_dir, dwLen); + result = RegQueryValueEx(hkey, , NULL, dwType, (LPBYTE)aspell_dir, dwLen); RegCloseKey(hkey); - strcpy(data_dir, aspell_dir); - strcat(data_dir, \\data); - strcpy(dict_dir, aspell_dir); - strcat(dict_dir, \\dict); + if(result == ERROR_SUCCESS) { + strlcpy(data_dir, aspell_dir, sizeof(data_dir)); + strlcat(data_dir, \\data, sizeof(data_dir)); + strlcpy(dict_dir, aspell_dir, sizeof(dict_dir)); + strlcat(dict_dir, \\dict, sizeof(dict_dir)); - pspell_config_replace(config, data-dir, data_dir); - pspell_config_replace(config, dict-dir, dict_dir); + pspell_config_replace(config, data-dir, data_dir); + pspell_config_replace(config, dict-dir, dict_dir); + } } #endif @@ -649,16 +655,19 @@ * pointing to the location of the dictionaries */ if(0 == RegOpenKey(HKEY_LOCAL_MACHINE, Software\\Aspell, hkey)) { + LONG result; dwLen = sizeof(aspell_dir) - 1; - RegQueryValueEx(hkey, , NULL, dwType, (LPBYTE)aspell_dir, dwLen); + result = RegQueryValueEx(hkey, , NULL, dwType, (LPBYTE)aspell_dir, dwLen); RegCloseKey(hkey); - strcpy(data_dir, aspell_dir); - strcat(data_dir, \\data); - strcpy(dict_dir, aspell_dir); - strcat(dict_dir, \\dict); + if(result == ERROR_SUCCESS) { + strlcpy(data_dir, aspell_dir, sizeof(data_dir)); + strlcat(data_dir, \\data, sizeof(data_dir)); + strlcpy(dict_dir, aspell_dir, sizeof(dict_dir)); + strlcat(dict_dir, \\dict, sizeof(dict_dir)); - pspell_config_replace(config, data-dir, data_dir); - pspell_config_replace(config, dict-dir, dict_dir); + pspell_config_replace(config, data-dir, data_dir); + pspell_config_replace(config, dict-dir, dict_dir); + } } #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pspell pspell.c
stasSat Feb 17 01:47:26 2007 UTC Modified files: /php-src/ext/pspell pspell.c Log: use safer functions, check error value http://cvs.php.net/viewvc.cgi/php-src/ext/pspell/pspell.c?r1=1.56r2=1.57diff_format=u Index: php-src/ext/pspell/pspell.c diff -u php-src/ext/pspell/pspell.c:1.56 php-src/ext/pspell/pspell.c:1.57 --- php-src/ext/pspell/pspell.c:1.56Tue Jan 16 11:18:54 2007 +++ php-src/ext/pspell/pspell.c Sat Feb 17 01:47:26 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: pspell.c,v 1.56 2007/01/16 11:18:54 tony2001 Exp $ */ +/* $Id: pspell.c,v 1.57 2007/02/17 01:47:26 stas Exp $ */ #define IS_EXT_MODULE @@ -186,16 +186,19 @@ * pointing to the location of the dictionaries */ if(0 == RegOpenKey(HKEY_LOCAL_MACHINE, Software\\Aspell, hkey)) { + LONG result; dwLen = sizeof(aspell_dir) - 1; - RegQueryValueEx(hkey, , NULL, dwType, (LPBYTE)aspell_dir, dwLen); + result = RegQueryValueEx(hkey, , NULL, dwType, (LPBYTE)aspell_dir, dwLen); RegCloseKey(hkey); - strcpy(data_dir, aspell_dir); - strcat(data_dir, \\data); - strcpy(dict_dir, aspell_dir); - strcat(dict_dir, \\dict); + if(result == ERROR_SUCCESS) { + strlcpy(data_dir, aspell_dir, sizeof(data_dir)); + strlcat(data_dir, \\data, sizeof(data_dir)); + strlcpy(dict_dir, aspell_dir, sizeof(dict_dir)); + strlcat(dict_dir, \\dict, sizeof(dict_dir)); - pspell_config_replace(config, data-dir, data_dir); - pspell_config_replace(config, dict-dir, dict_dir); + pspell_config_replace(config, data-dir, data_dir); + pspell_config_replace(config, dict-dir, dict_dir); + } } #endif @@ -291,16 +294,19 @@ * pointing to the location of the dictionaries */ if(0 == RegOpenKey(HKEY_LOCAL_MACHINE, Software\\Aspell, hkey)) { + LONG result; dwLen = sizeof(aspell_dir) - 1; - RegQueryValueEx(hkey, , NULL, dwType, (LPBYTE)aspell_dir, dwLen); + result = RegQueryValueEx(hkey, , NULL, dwType, (LPBYTE)aspell_dir, dwLen); RegCloseKey(hkey); - strcpy(data_dir, aspell_dir); - strcat(data_dir, \\data); - strcpy(dict_dir, aspell_dir); - strcat(dict_dir, \\dict); + if(result == ERROR_SUCCESS) { + strlcpy(data_dir, aspell_dir, sizeof(data_dir)); + strlcat(data_dir, \\data, sizeof(data_dir)); + strlcpy(dict_dir, aspell_dir, sizeof(dict_dir)); + strlcat(dict_dir, \\dict, sizeof(dict_dir)); - pspell_config_replace(config, data-dir, data_dir); - pspell_config_replace(config, dict-dir, dict_dir); + pspell_config_replace(config, data-dir, data_dir); + pspell_config_replace(config, dict-dir, dict_dir); + } } #endif @@ -644,16 +650,19 @@ * pointing to the location of the dictionaries */ if(0 == RegOpenKey(HKEY_LOCAL_MACHINE, Software\\Aspell, hkey)) { + LONG result; dwLen = sizeof(aspell_dir) - 1; - RegQueryValueEx(hkey, , NULL, dwType, (LPBYTE)aspell_dir, dwLen); + result = RegQueryValueEx(hkey, , NULL, dwType, (LPBYTE)aspell_dir, dwLen); RegCloseKey(hkey); - strcpy(data_dir, aspell_dir); - strcat(data_dir, \\data); - strcpy(dict_dir, aspell_dir); - strcat(dict_dir, \\dict); + if(result == ERROR_SUCCESS) { + strlcpy(data_dir, aspell_dir, sizeof(data_dir)); + strlcat(data_dir, \\data, sizeof(data_dir)); + strlcpy(dict_dir, aspell_dir, sizeof(dict_dir)); + strlcat(dict_dir, \\dict, sizeof(dict_dir)); - pspell_config_replace(config, data-dir, data_dir); - pspell_config_replace(config, dict-dir, dict_dir); + pspell_config_replace(config, data-dir, data_dir); + pspell_config_replace(config, dict-dir, dict_dir); + } } #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php