[PHP-CVS] cvs: php-src /ext/mysqlnd mysqlnd.c
johannesTue Aug 19 10:15:57 2008 UTC Modified files: /php-src/ext/mysqlndmysqlnd.c Log: Fix empty error message when connecting to a bad server http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.25r2=1.26diff_format=u Index: php-src/ext/mysqlnd/mysqlnd.c diff -u php-src/ext/mysqlnd/mysqlnd.c:1.25 php-src/ext/mysqlnd/mysqlnd.c:1.26 --- php-src/ext/mysqlnd/mysqlnd.c:1.25 Tue Jul 15 13:12:27 2008 +++ php-src/ext/mysqlnd/mysqlnd.c Tue Aug 19 10:15:56 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: mysqlnd.c,v 1.25 2008/07/15 13:12:27 andrey Exp $ */ +/* $Id: mysqlnd.c,v 1.26 2008/08/19 10:15:56 johannes Exp $ */ #include php.h #include mysqlnd.h #include mysqlnd_wireprotocol.h @@ -58,7 +58,7 @@ - +const char * mysqlnd_old_passwd = mysqlnd cannot connect to MySQL 4.1+ using old authentication; const char * mysqlnd_server_gone = MySQL server has gone away; const char * mysqlnd_out_of_sync = Commands out of sync; you can't run this command now; @@ -692,8 +692,8 @@ if (FAIL == PACKET_READ_ALLOCA(ok_packet, conn) || ok_packet.field_count = 0xFE) { if (ok_packet.field_count == 0xFE) { /* old authentication with new server !*/ - DBG_ERR(mysqlnd cannot connect to MySQL 4.1+ using old authentication); - php_error_docref(NULL TSRMLS_CC, E_WARNING, mysqlnd cannot connect to MySQL 4.1+ using old authentication); + DBG_ERR(mysqlnd_old_passwd); + SET_CLIENT_ERROR(conn-error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, mysqlnd_old_passwd); } else if (ok_packet.field_count == 0xFF) { if (ok_packet.sqlstate[0]) { if (!self_alloced) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd.c
johannesTue Aug 19 10:16:12 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/mysqlndmysqlnd.c Log: MFH: Fix empty error message when connecting to a bad server http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.5.2.24r2=1.5.2.25diff_format=u Index: php-src/ext/mysqlnd/mysqlnd.c diff -u php-src/ext/mysqlnd/mysqlnd.c:1.5.2.24 php-src/ext/mysqlnd/mysqlnd.c:1.5.2.25 --- php-src/ext/mysqlnd/mysqlnd.c:1.5.2.24 Tue Jul 15 13:11:09 2008 +++ php-src/ext/mysqlnd/mysqlnd.c Tue Aug 19 10:16:12 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: mysqlnd.c,v 1.5.2.24 2008/07/15 13:11:09 andrey Exp $ */ +/* $Id: mysqlnd.c,v 1.5.2.25 2008/08/19 10:16:12 johannes Exp $ */ #include php.h #include mysqlnd.h #include mysqlnd_wireprotocol.h @@ -58,7 +58,7 @@ - +const char * mysqlnd_old_passwd = mysqlnd cannot connect to MySQL 4.1+ using old authentication; const char * mysqlnd_server_gone = MySQL server has gone away; const char * mysqlnd_out_of_sync = Commands out of sync; you can't run this command now; @@ -692,8 +692,8 @@ if (FAIL == PACKET_READ_ALLOCA(ok_packet, conn) || ok_packet.field_count = 0xFE) { if (ok_packet.field_count == 0xFE) { /* old authentication with new server !*/ - DBG_ERR(mysqlnd cannot connect to MySQL 4.1+ using old authentication); - php_error_docref(NULL TSRMLS_CC, E_WARNING, mysqlnd cannot connect to MySQL 4.1+ using old authentication); + DBG_ERR(mysqlnd_old_passwd); + SET_CLIENT_ERROR(conn-error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, mysqlnd_old_passwd); } else if (ok_packet.field_count == 0xFF) { if (ok_packet.sqlstate[0]) { if (!self_alloced) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mysqlnd mysqlnd.c mysqlnd_priv.h
johannesTue Aug 19 10:42:01 2008 UTC Modified files: /php-src/ext/mysqlndmysqlnd.c mysqlnd_priv.h Log: constify strings http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.26r2=1.27diff_format=u Index: php-src/ext/mysqlnd/mysqlnd.c diff -u php-src/ext/mysqlnd/mysqlnd.c:1.26 php-src/ext/mysqlnd/mysqlnd.c:1.27 --- php-src/ext/mysqlnd/mysqlnd.c:1.26 Tue Aug 19 10:15:56 2008 +++ php-src/ext/mysqlnd/mysqlnd.c Tue Aug 19 10:42:00 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: mysqlnd.c,v 1.26 2008/08/19 10:15:56 johannes Exp $ */ +/* $Id: mysqlnd.c,v 1.27 2008/08/19 10:42:00 johannes Exp $ */ #include php.h #include mysqlnd.h #include mysqlnd_wireprotocol.h @@ -58,9 +58,9 @@ -const char * mysqlnd_old_passwd = mysqlnd cannot connect to MySQL 4.1+ using old authentication; -const char * mysqlnd_server_gone = MySQL server has gone away; -const char * mysqlnd_out_of_sync = Commands out of sync; you can't run this command now; +const char * const mysqlnd_old_passwd = mysqlnd cannot connect to MySQL 4.1+ using old authentication; +const char * const mysqlnd_server_gone = MySQL server has gone away; +const char * const mysqlnd_out_of_sync = Commands out of sync; you can't run this command now; MYSQLND_STATS *mysqlnd_global_stats = NULL; static zend_bool mysqlnd_library_initted = FALSE; http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_priv.h?r1=1.15r2=1.16diff_format=u Index: php-src/ext/mysqlnd/mysqlnd_priv.h diff -u php-src/ext/mysqlnd/mysqlnd_priv.h:1.15 php-src/ext/mysqlnd/mysqlnd_priv.h:1.16 --- php-src/ext/mysqlnd/mysqlnd_priv.h:1.15 Thu Apr 24 14:04:58 2008 +++ php-src/ext/mysqlnd/mysqlnd_priv.h Tue Aug 19 10:42:00 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: mysqlnd_priv.h,v 1.15 2008/04/24 14:04:58 andrey Exp $ */ +/* $Id: mysqlnd_priv.h,v 1.16 2008/08/19 10:42:00 johannes Exp $ */ #ifndef MYSQLND_PRIV_H #define MYSQLND_PRIV_H @@ -163,8 +163,9 @@ extern struct st_mysqlnd_perm_bind mysqlnd_ps_fetch_functions[MYSQL_TYPE_LAST + 1]; -extern const char * mysqlnd_out_of_sync; -extern const char * mysqlnd_server_gone; +extern const char * const mysqlnd_old_passwd; +extern const char * const mysqlnd_out_of_sync; +extern const char * const mysqlnd_server_gone; enum_func_status mysqlnd_handle_local_infile(MYSQLND *conn, const char *filename, zend_bool *is_warning TSRMLS_DC); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd.c mysqlnd_priv.h
johannesTue Aug 19 10:42:11 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/mysqlndmysqlnd.c mysqlnd_priv.h Log: MFH: constify strings http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.5.2.25r2=1.5.2.26diff_format=u Index: php-src/ext/mysqlnd/mysqlnd.c diff -u php-src/ext/mysqlnd/mysqlnd.c:1.5.2.25 php-src/ext/mysqlnd/mysqlnd.c:1.5.2.26 --- php-src/ext/mysqlnd/mysqlnd.c:1.5.2.25 Tue Aug 19 10:16:12 2008 +++ php-src/ext/mysqlnd/mysqlnd.c Tue Aug 19 10:42:11 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: mysqlnd.c,v 1.5.2.25 2008/08/19 10:16:12 johannes Exp $ */ +/* $Id: mysqlnd.c,v 1.5.2.26 2008/08/19 10:42:11 johannes Exp $ */ #include php.h #include mysqlnd.h #include mysqlnd_wireprotocol.h @@ -58,9 +58,9 @@ -const char * mysqlnd_old_passwd = mysqlnd cannot connect to MySQL 4.1+ using old authentication; -const char * mysqlnd_server_gone = MySQL server has gone away; -const char * mysqlnd_out_of_sync = Commands out of sync; you can't run this command now; +const char * const mysqlnd_old_passwd = mysqlnd cannot connect to MySQL 4.1+ using old authentication; +const char * const mysqlnd_server_gone = MySQL server has gone away; +const char * const mysqlnd_out_of_sync = Commands out of sync; you can't run this command now; MYSQLND_STATS *mysqlnd_global_stats = NULL; static zend_bool mysqlnd_library_initted = FALSE; http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_priv.h?r1=1.4.2.12r2=1.4.2.13diff_format=u Index: php-src/ext/mysqlnd/mysqlnd_priv.h diff -u php-src/ext/mysqlnd/mysqlnd_priv.h:1.4.2.12 php-src/ext/mysqlnd/mysqlnd_priv.h:1.4.2.13 --- php-src/ext/mysqlnd/mysqlnd_priv.h:1.4.2.12 Thu Apr 24 14:22:19 2008 +++ php-src/ext/mysqlnd/mysqlnd_priv.h Tue Aug 19 10:42:11 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: mysqlnd_priv.h,v 1.4.2.12 2008/04/24 14:22:19 andrey Exp $ */ +/* $Id: mysqlnd_priv.h,v 1.4.2.13 2008/08/19 10:42:11 johannes Exp $ */ #ifndef MYSQLND_PRIV_H #define MYSQLND_PRIV_H @@ -163,8 +163,9 @@ extern struct st_mysqlnd_perm_bind mysqlnd_ps_fetch_functions[MYSQL_TYPE_LAST + 1]; -extern const char * mysqlnd_out_of_sync; -extern const char * mysqlnd_server_gone; +extern const char * const mysqlnd_old_passwd; +extern const char * const mysqlnd_out_of_sync; +extern const char * const mysqlnd_server_gone; enum_func_status mysqlnd_handle_local_infile(MYSQLND *conn, const char *filename, zend_bool *is_warning TSRMLS_DC); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS
felipe Tue Aug 19 11:10:17 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS Log: - Note about property_exists() http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.278r2=1.2027.2.547.2.965.2.279diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.278 php-src/NEWS:1.2027.2.547.2.965.2.279 --- php-src/NEWS:1.2027.2.547.2.965.2.278 Mon Aug 18 17:53:10 2008 +++ php-src/NEWSTue Aug 19 11:10:17 2008 @@ -4,6 +4,8 @@ - Removed shebang line check from CGI sapi (it is checked by scanner). (Dmitry) - Changed session_start() to return false when session startup fails. (Jani) +- Changed property_exists() to check the existence of a property independent of + accessibility (like method_exists()). - Added system independent realpath() implementation which caches intermediate directories in realpath-cache. (Dmitry) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS
felipe Tue Aug 19 11:15:59 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS Log: - Opss, I forgot add my name... http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.279r2=1.2027.2.547.2.965.2.280diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.279 php-src/NEWS:1.2027.2.547.2.965.2.280 --- php-src/NEWS:1.2027.2.547.2.965.2.279 Tue Aug 19 11:10:17 2008 +++ php-src/NEWSTue Aug 19 11:15:59 2008 @@ -5,7 +5,7 @@ - Changed session_start() to return false when session startup fails. (Jani) - Changed property_exists() to check the existence of a property independent of - accessibility (like method_exists()). + accessibility (like method_exists()). (Felipe) - Added system independent realpath() implementation which caches intermediate directories in realpath-cache. (Dmitry) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard basic_functions.c crypt.c php_crypt.h
tony2001Tue Aug 19 15:14:16 2008 UTC Modified files: /php-src/ext/standard basic_functions.c crypt.c php_crypt.h Log: shudown crypt correctly and fix memleak in ZTS mode http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.921r2=1.922diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.921 php-src/ext/standard/basic_functions.c:1.922 --- php-src/ext/standard/basic_functions.c:1.921Mon Aug 18 10:40:05 2008 +++ php-src/ext/standard/basic_functions.c Tue Aug 19 15:14:15 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.921 2008/08/18 10:40:05 jani Exp $ */ +/* $Id: basic_functions.c,v 1.922 2008/08/19 15:14:15 tony2001 Exp $ */ #include php.h #include php_streams.h @@ -4105,7 +4105,6 @@ basic_globals_dtor(basic_globals TSRMLS_CC); #ifdef PHP_WIN32 php_win32_core_globals_dtor(the_php_win32_core_globals TSRMLS_CC); - PHP_MSHUTDOWN(crypt); #endif #endif @@ -4126,6 +4125,7 @@ #if defined(HAVE_LOCALECONV) defined(ZTS) PHP_MSHUTDOWN(localeconv)(SHUTDOWN_FUNC_ARGS_PASSTHRU); #endif + PHP_MSHUTDOWN(crypt)(SHUTDOWN_FUNC_ARGS_PASSTHRU); return SUCCESS; } http://cvs.php.net/viewvc.cgi/php-src/ext/standard/crypt.c?r1=1.74r2=1.75diff_format=u Index: php-src/ext/standard/crypt.c diff -u php-src/ext/standard/crypt.c:1.74 php-src/ext/standard/crypt.c:1.75 --- php-src/ext/standard/crypt.c:1.74 Mon Jul 28 11:34:53 2008 +++ php-src/ext/standard/crypt.cTue Aug 19 15:14:15 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: crypt.c,v 1.74 2008/07/28 11:34:53 pajoye Exp $ */ +/* $Id: crypt.c,v 1.75 2008/08/19 15:14:15 tony2001 Exp $ */ #include stdlib.h @@ -108,15 +108,16 @@ return SUCCESS; } +/* }}} */ -#ifdef PHP_USE_PHP_CRYPT_R -PHP_MSHUTDOWN_FUNCTION(crypt) +PHP_MSHUTDOWN_FUNCTION(crypt) /* {{{ */ { +#ifdef PHP_USE_PHP_CRYPT_R php_shutdown_crypt_r(); +#endif return SUCCESS; } -#endif /* }}} */ static unsigned char itoa64[] = ./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz; http://cvs.php.net/viewvc.cgi/php-src/ext/standard/php_crypt.h?r1=1.21r2=1.22diff_format=u Index: php-src/ext/standard/php_crypt.h diff -u php-src/ext/standard/php_crypt.h:1.21 php-src/ext/standard/php_crypt.h:1.22 --- php-src/ext/standard/php_crypt.h:1.21 Mon Dec 31 07:12:16 2007 +++ php-src/ext/standard/php_crypt.hTue Aug 19 15:14:15 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_crypt.h,v 1.21 2007/12/31 07:12:16 sebastian Exp $ */ +/* $Id: php_crypt.h,v 1.22 2008/08/19 15:14:15 tony2001 Exp $ */ #ifndef PHP_CRYPT_H #define PHP_CRYPT_H @@ -26,6 +26,7 @@ PHP_FUNCTION(crypt); #if HAVE_CRYPT PHP_MINIT_FUNCTION(crypt); +PHP_MSHUTDOWN_FUNCTION(crypt); PHP_RINIT_FUNCTION(crypt); #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c crypt.c php_crypt.h
tony2001Tue Aug 19 15:14:46 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard basic_functions.c crypt.c php_crypt.h Log: MFH: shutdown crypt correctly and fix memleak in ZTS mode http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.55r2=1.725.2.31.2.64.2.56diff_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.55 php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.56 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.55 Mon Aug 18 10:49:59 2008 +++ php-src/ext/standard/basic_functions.c Tue Aug 19 15:14:46 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.55 2008/08/18 10:49:59 jani Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.56 2008/08/19 15:14:46 tony2001 Exp $ */ #include php.h #include php_streams.h @@ -4108,7 +4108,6 @@ basic_globals_dtor(basic_globals TSRMLS_CC); #ifdef PHP_WIN32 php_win32_core_globals_dtor(the_php_win32_core_globals TSRMLS_CC); - PHP_MSHUTDOWN(crypt); #endif #endif @@ -4129,6 +4128,7 @@ #if defined(HAVE_LOCALECONV) defined(ZTS) PHP_MSHUTDOWN(localeconv)(SHUTDOWN_FUNC_ARGS_PASSTHRU); #endif + PHP_MSHUTDOWN(crypt)(SHUTDOWN_FUNC_ARGS_PASSTHRU); return SUCCESS; } http://cvs.php.net/viewvc.cgi/php-src/ext/standard/crypt.c?r1=1.62.2.1.2.6.2.3r2=1.62.2.1.2.6.2.4diff_format=u Index: php-src/ext/standard/crypt.c diff -u php-src/ext/standard/crypt.c:1.62.2.1.2.6.2.3 php-src/ext/standard/crypt.c:1.62.2.1.2.6.2.4 --- php-src/ext/standard/crypt.c:1.62.2.1.2.6.2.3 Mon Jul 28 11:50:34 2008 +++ php-src/ext/standard/crypt.cTue Aug 19 15:14:46 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: crypt.c,v 1.62.2.1.2.6.2.3 2008/07/28 11:50:34 pajoye Exp $ */ +/* $Id: crypt.c,v 1.62.2.1.2.6.2.4 2008/08/19 15:14:46 tony2001 Exp $ */ #include stdlib.h @@ -107,15 +107,16 @@ return SUCCESS; } +/* }}} */ -#ifdef PHP_USE_PHP_CRYPT_R -PHP_MSHUTDOWN_FUNCTION(crypt) +PHP_MSHUTDOWN_FUNCTION(crypt) /* {{{ */ { +#ifdef PHP_USE_PHP_CRYPT_R php_shutdown_crypt_r(); +#endif return SUCCESS; } -#endif /* }}} */ static unsigned char itoa64[] = ./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz; http://cvs.php.net/viewvc.cgi/php-src/ext/standard/php_crypt.h?r1=1.18.2.1.2.1.2.2r2=1.18.2.1.2.1.2.3diff_format=u Index: php-src/ext/standard/php_crypt.h diff -u php-src/ext/standard/php_crypt.h:1.18.2.1.2.1.2.2 php-src/ext/standard/php_crypt.h:1.18.2.1.2.1.2.3 --- php-src/ext/standard/php_crypt.h:1.18.2.1.2.1.2.2 Mon Jul 28 11:50:34 2008 +++ php-src/ext/standard/php_crypt.hTue Aug 19 15:14:46 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_crypt.h,v 1.18.2.1.2.1.2.2 2008/07/28 11:50:34 pajoye Exp $ */ +/* $Id: php_crypt.h,v 1.18.2.1.2.1.2.3 2008/08/19 15:14:46 tony2001 Exp $ */ #ifndef PHP_CRYPT_H #define PHP_CRYPT_H @@ -26,9 +26,7 @@ PHP_FUNCTION(crypt); #if HAVE_CRYPT PHP_MINIT_FUNCTION(crypt); -#if PHP_WIN32 PHP_MSHUTDOWN_FUNCTION(crypt); -#endif PHP_RINIT_FUNCTION(crypt); #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard browscap.c
tony2001Tue Aug 19 15:16:23 2008 UTC Modified files: /php-src/ext/standard browscap.c Log: fix memleak in browscap code (noticed by Gopal) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/browscap.c?r1=1.100r2=1.101diff_format=u Index: php-src/ext/standard/browscap.c diff -u php-src/ext/standard/browscap.c:1.100 php-src/ext/standard/browscap.c:1.101 --- php-src/ext/standard/browscap.c:1.100 Thu Aug 7 12:51:05 2008 +++ php-src/ext/standard/browscap.c Tue Aug 19 15:16:23 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: browscap.c,v 1.100 2008/08/07 12:51:05 nlopess Exp $ */ +/* $Id: browscap.c,v 1.101 2008/08/19 15:16:23 tony2001 Exp $ */ #include php.h #include php_browscap.h @@ -118,7 +118,8 @@ char *new_key; /* parent entry can not be same as current section - causes infinite loop! */ - if (!strcasecmp(Z_STRVAL_P(arg1), parent) + if (!strcasecmp(Z_STRVAL_P(arg1), parent) + current_section_name != NULL !strcasecmp(current_section_name, Z_STRVAL_P(arg2)) ) { zend_error(E_CORE_ERROR, Invalid browscap ini file: 'Parent' value can not be same as the section name: %s (in file %s), current_section_name, INI_STR(browscap)); @@ -171,6 +172,9 @@ zend_hash_init(section_properties, 0, NULL, (dtor_func_t) browscap_entry_dtor, 1); Z_ARRVAL_P(current_section) = section_properties; Z_TYPE_P(current_section) = IS_ARRAY; + if (current_section_name) { + free(current_section_name); + } current_section_name = zend_strndup(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1)); zend_hash_update(browser_hash, Z_STRVAL_P(arg1), Z_STRLEN_P(arg1) + 1, (void *) current_section, sizeof(zval *), NULL); @@ -213,7 +217,12 @@ } fh.filename = browscap; Z_TYPE(fh) = ZEND_HANDLE_FP; + current_section_name = NULL; zend_parse_ini_file(fh, 1, ZEND_INI_SCANNER_RAW, (zend_ini_parser_cb_t) php_browscap_parser_cb, browser_hash TSRMLS_CC); + if (current_section_name) { + free(current_section_name); + current_section_name = NULL; + } } return SUCCESS; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard browscap.c
tony2001Tue Aug 19 15:16:33 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard browscap.c Log: MFH: fix memleak in browscap code (noticed by Gopal) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/browscap.c?r1=1.85.2.2.2.3.2.7r2=1.85.2.2.2.3.2.8diff_format=u Index: php-src/ext/standard/browscap.c diff -u php-src/ext/standard/browscap.c:1.85.2.2.2.3.2.7 php-src/ext/standard/browscap.c:1.85.2.2.2.3.2.8 --- php-src/ext/standard/browscap.c:1.85.2.2.2.3.2.7Thu Aug 7 12:50:17 2008 +++ php-src/ext/standard/browscap.c Tue Aug 19 15:16:33 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: browscap.c,v 1.85.2.2.2.3.2.7 2008/08/07 12:50:17 nlopess Exp $ */ +/* $Id: browscap.c,v 1.85.2.2.2.3.2.8 2008/08/19 15:16:33 tony2001 Exp $ */ #include php.h #include php_browscap.h @@ -118,7 +118,8 @@ char *new_key; /* parent entry can not be same as current section - causes infinite loop! */ - if (!strcasecmp(Z_STRVAL_P(arg1), parent) + if (!strcasecmp(Z_STRVAL_P(arg1), parent) + current_section_name != NULL !strcasecmp(current_section_name, Z_STRVAL_P(arg2)) ) { zend_error(E_CORE_ERROR, Invalid browscap ini file: 'Parent' value can not be same as the section name: %s (in file %s), current_section_name, INI_STR(browscap)); @@ -171,6 +172,9 @@ zend_hash_init(section_properties, 0, NULL, (dtor_func_t) browscap_entry_dtor, 1); Z_ARRVAL_P(current_section) = section_properties; Z_TYPE_P(current_section) = IS_ARRAY; + if (current_section_name) { + free(current_section_name); + } current_section_name = zend_strndup(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1)); zend_hash_update(browser_hash, Z_STRVAL_P(arg1), Z_STRLEN_P(arg1) + 1, (void *) current_section, sizeof(zval *), NULL); @@ -213,7 +217,12 @@ } fh.filename = browscap; Z_TYPE(fh) = ZEND_HANDLE_FP; + current_section_name = NULL; zend_parse_ini_file(fh, 1, ZEND_INI_SCANNER_RAW, (zend_ini_parser_cb_t) php_browscap_parser_cb, browser_hash TSRMLS_CC); + if (current_section_name) { + free(current_section_name); + current_section_name = NULL; + } } return SUCCESS; -- 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 /ext/pcre php_pcre.c
janiWed Aug 20 00:52:13 2008 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/ext/pcre php_pcre.c Log: MFH: Fix for bug #42737 (and #45850) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1201r2=1.2027.2.547.2.1202diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1201 php-src/NEWS:1.2027.2.547.2.1202 --- php-src/NEWS:1.2027.2.547.2.1201Mon Aug 18 14:32:58 2008 +++ php-src/NEWSWed Aug 20 00:52:12 2008 @@ -5,7 +5,7 @@ (Felipe) - Added PHP_INI_SCAN_DIR environment variable which can be used to either - disable or change the compile time ini scan directory (FR 45114). (Jani) + disable or change the compile time ini scan directory (FR #45114). (Jani) - Fixed security issues detailed in CVE-2008-2665 and CVE-2008-2666. (Christian Hoffmann) @@ -80,6 +80,8 @@ (Jani) - Fixed bug #43993 (mb_substr_count() behaves differently to substr_count() with overlapping needles). (Moriyoshi) +- Fixed bug #42737 (preg_split('//u') triggers a E_NOTICE with newlines). + (Nuno) - Fixed bug #42604 (make test fails with --with-config-file-scan-dir=path). (Jani) - Fixed bug #41348 (OCI8: allow compilation with Oracle 8.1). (Chris Jones) http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.c?r1=1.168.2.9.2.26r2=1.168.2.9.2.27diff_format=u Index: php-src/ext/pcre/php_pcre.c diff -u php-src/ext/pcre/php_pcre.c:1.168.2.9.2.26 php-src/ext/pcre/php_pcre.c:1.168.2.9.2.27 --- php-src/ext/pcre/php_pcre.c:1.168.2.9.2.26 Fri Aug 8 09:34:08 2008 +++ php-src/ext/pcre/php_pcre.c Wed Aug 20 00:52:13 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_pcre.c,v 1.168.2.9.2.26 2008/08/08 09:34:08 lbarnaud Exp $ */ +/* $Id: php_pcre.c,v 1.168.2.9.2.27 2008/08/20 00:52:13 jani Exp $ */ #include php.h #include php_ini.h @@ -1528,7 +1528,7 @@ if (re_bump == NULL) { int dummy; - if ((re_bump = pcre_get_compiled_regex(/./u, extra_bump, dummy TSRMLS_CC)) == NULL) { + if ((re_bump = pcre_get_compiled_regex(/./us, extra_bump, dummy TSRMLS_CC)) == NULL) { RETURN_FALSE; } } -- 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/pcre/tests bug42737.phpt
janiWed Aug 20 01:11:07 2008 UTC Added files: (Branch: PHP_5_2) /php-src/ext/pcre/tests bug42737.phpt Log: MFH: test for bug #42737 http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/bug42737.phpt?view=markuprev=1.1 Index: php-src/ext/pcre/tests/bug42737.phpt +++ php-src/ext/pcre/tests/bug42737.phpt -- 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 /ext/pcre php_pcre.c /ext/pcre/tests bug44925.phpt
janiWed Aug 20 01:21:48 2008 UTC Added files: (Branch: PHP_5_2) /php-src/ext/pcre/tests bug44925.phpt Modified files: /php-srcNEWS /php-src/ext/pcre php_pcre.c Log: MFH: - Fixed bug #44925 (preg_grep() modifies input array). (Nuno) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1202r2=1.2027.2.547.2.1203diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1202 php-src/NEWS:1.2027.2.547.2.1203 --- php-src/NEWS:1.2027.2.547.2.1202Wed Aug 20 00:52:12 2008 +++ php-src/NEWSWed Aug 20 01:21:46 2008 @@ -63,6 +63,7 @@ and hash()). (Tony) - Fixed bug #45004 (pg_insert() does not accept 4 digit timezone format). (Ilia) +- Fixed bug #44925 (preg_grep() modifies input array). (Nuno) - Fixed bug #44891 Memory leak using registerPHPFunctions and XSLT Variable as function parameter. (Rob) - Fixed bug #44830 (Very minor issue with backslash in heredoc). (Matt) http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.c?r1=1.168.2.9.2.27r2=1.168.2.9.2.28diff_format=u Index: php-src/ext/pcre/php_pcre.c diff -u php-src/ext/pcre/php_pcre.c:1.168.2.9.2.27 php-src/ext/pcre/php_pcre.c:1.168.2.9.2.28 --- php-src/ext/pcre/php_pcre.c:1.168.2.9.2.27 Wed Aug 20 00:52:13 2008 +++ php-src/ext/pcre/php_pcre.c Wed Aug 20 01:21:47 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_pcre.c,v 1.168.2.9.2.27 2008/08/20 00:52:13 jani Exp $ */ +/* $Id: php_pcre.c,v 1.168.2.9.2.28 2008/08/20 01:21:47 jani Exp $ */ #include php.h #include php_ini.h @@ -1731,13 +1731,17 @@ /* Go through the input array */ zend_hash_internal_pointer_reset(Z_ARRVAL_P(input)); - while(zend_hash_get_current_data(Z_ARRVAL_P(input), (void **)entry) == SUCCESS) { + while (zend_hash_get_current_data(Z_ARRVAL_P(input), (void **)entry) == SUCCESS) { + zval subject = **entry; - convert_to_string_ex(entry); + if (Z_TYPE_PP(entry) != IS_STRING) { + zval_copy_ctor(subject); + convert_to_string(subject); + } /* Perform the match */ - count = pcre_exec(pce-re, extra, Z_STRVAL_PP(entry), - Z_STRLEN_PP(entry), 0, + count = pcre_exec(pce-re, extra, Z_STRVAL(subject), + Z_STRLEN(subject), 0, 0, offsets, size_offsets); /* Check for too many substrings condition. */ @@ -1750,9 +1754,8 @@ } /* If the entry fits our requirements */ - if ((count 0 !invert) || - (count == PCRE_ERROR_NOMATCH invert)) { - (*entry)-refcount++; + if ((count 0 !invert) || (count == PCRE_ERROR_NOMATCH invert)) { + ZVAL_ADDREF(*entry); /* Add to return array */ switch (zend_hash_get_current_key(Z_ARRVAL_P(input), string_key, num_key, 0)) @@ -1768,7 +1771,11 @@ break; } } - + + if (Z_TYPE_PP(entry) != IS_STRING) { + zval_dtor(subject); + } + zend_hash_move_forward(Z_ARRVAL_P(input)); } zend_hash_internal_pointer_reset(Z_ARRVAL_P(input)); http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/bug44925.phpt?view=markuprev=1.1 Index: php-src/ext/pcre/tests/bug44925.phpt +++ php-src/ext/pcre/tests/bug44925.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS
felipe Wed Aug 20 01:32:56 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS Log: - Removed entries merged into 5_2 http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.280r2=1.2027.2.547.2.965.2.281diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.280 php-src/NEWS:1.2027.2.547.2.965.2.281 --- php-src/NEWS:1.2027.2.547.2.965.2.280 Tue Aug 19 11:15:59 2008 +++ php-src/NEWSWed Aug 20 01:32:56 2008 @@ -41,8 +41,6 @@ - Fixed bug #45384 (parse_ini_file will result in parse error with no trailing newline). (Arnaud) - Fixed bug #45044 (relative paths not resolved correctly). (Dmitry) -- Fixed bug #45028 (CRC32 output endianness is different between crc32() - and hash()). (Tony) - Fixed bug #44925 (preg_grep() modifies input array). (Nuno) - Fixed bug #44842 (parse_ini_file keys that start/end with underscore). (Arnaud) @@ -398,8 +396,6 @@ (Zoe Slattery) - Fixed bug #42848 (Status: header incorrect under FastCGI). (Dmitry) - Fixed bug #42773 (WSDL error causes HTTP 500 Response). (Dmitry) -- Fixed bug #42737 (preg_split('//u') triggers a E_NOTICE with newlines). - (Nuno) - Fixed bug #42736 (xmlrpc_server_call_method() crashes). (Tony) - Fixed bug #42663 (gzinflate() try to allocate all memory with truncated data). (Arnaud) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php