Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/wddx wddx.c
On Sun, 4 Mar 2007, Stanislav Malyshev wrote: stas Sun Mar 4 02:23:49 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/wddx wddx.c Log: fix wrong code # noticed by Stefan Esser Are you merging this to PHP_4_4 as well? regards, Derick http://cvs.php.net/viewvc.cgi/php-src/ext/wddx/wddx.c?r1=1.119.2.10.2.13r2=1.119.2.10.2.14diff_format=u Index: php-src/ext/wddx/wddx.c diff -u php-src/ext/wddx/wddx.c:1.119.2.10.2.13 php-src/ext/wddx/wddx.c:1.119.2.10.2.14 --- php-src/ext/wddx/wddx.c:1.119.2.10.2.13 Tue Feb 27 03:28:17 2007 +++ php-src/ext/wddx/wddx.c Sun Mar 4 02:23:47 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: wddx.c,v 1.119.2.10.2.13 2007/02/27 03:28:17 iliaa Exp $ */ +/* $Id: wddx.c,v 1.119.2.10.2.14 2007/03/04 02:23:47 stas Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -1034,9 +1034,9 @@ Z_STRVAL_P(ent-data) = estrndup(decoded, decoded_len); Z_STRLEN_P(ent-data) = decoded_len; } else { + Z_STRVAL_P(ent-data) = erealloc(Z_STRVAL_P(ent-data), Z_STRLEN_P(ent-data) + decoded_len + 1); + strlcpy(Z_STRVAL_P(ent-data) + Z_STRLEN_P(ent-data), decoded, decoded_len); Z_STRLEN_P(ent-data) += decoded_len; - Z_STRVAL_P(ent-data) = erealloc(Z_STRVAL_P(ent-data), Z_STRLEN_P(ent-data) + 1); - strlcpy(Z_STRVAL_P(ent-data) + Z_STRLEN_P(ent-data), decoded, Z_STRLEN_P(ent-data) + 1); Z_STRVAL_P(ent-data)[Z_STRLEN_P(ent-data)] = '\0'; } -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/date php_date.c
mikeMon Mar 5 14:05:31 2007 UTC Modified files: /php-src/ext/date php_date.c Log: - fix bug #40691: add comparison object handler http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.131r2=1.132diff_format=u Index: php-src/ext/date/php_date.c diff -u php-src/ext/date/php_date.c:1.131 php-src/ext/date/php_date.c:1.132 --- php-src/ext/date/php_date.c:1.131 Wed Feb 14 19:35:01 2007 +++ php-src/ext/date/php_date.c Mon Mar 5 14:05:31 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_date.c,v 1.131 2007/02/14 19:35:01 derick Exp $ */ +/* $Id: php_date.c,v 1.132 2007/03/05 14:05:31 mike Exp $ */ #include php.h #include php_streams.h @@ -300,6 +300,7 @@ static zend_object_value date_object_new_date(zend_class_entry *class_type TSRMLS_DC); static zend_object_value date_object_new_timezone(zend_class_entry *class_type TSRMLS_DC); static zend_object_value date_object_clone_date(zval *this_ptr TSRMLS_DC); +static int date_object_compare_date(zval *d1, zval *d2 TSRMLS_DC); static zend_object_value date_object_clone_timezone(zval *this_ptr TSRMLS_DC); /* This is need to ensure that session extension request shutdown occurs 1st, because it uses the date extension */ @@ -1589,6 +1590,7 @@ date_ce_date = zend_register_internal_class_ex(ce_date, NULL, NULL TSRMLS_CC); memcpy(date_object_handlers_date, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); date_object_handlers_date.clone_obj = date_object_clone_date; + date_object_handlers_date.compare_objects = date_object_compare_date; #define REGISTER_DATE_CLASS_CONST_STRING(const_name, value) \ zend_declare_class_constant_stringl(date_ce_date, const_name, sizeof(const_name)-1, value, sizeof(value)-1 TSRMLS_CC); @@ -1660,6 +1662,27 @@ return new_ov; } +static int date_object_compare_date(zval *d1, zval *d2 TSRMLS_DC) +{ + if (Z_TYPE_P(d1) == IS_OBJECT Z_TYPE_P(d2) == IS_OBJECT + instanceof_function(Z_OBJCE_P(d1), date_ce_date TSRMLS_CC) + instanceof_function(Z_OBJCE_P(d2), date_ce_date TSRMLS_CC)) { + php_date_obj *o1 = zend_object_store_get_object(d1 TSRMLS_CC); + php_date_obj *o2 = zend_object_store_get_object(d2 TSRMLS_CC); + + if (!o1-time-sse_uptodate) { + timelib_update_ts(o1-time, o1-time-tz_info); + } + if (!o2-time-sse_uptodate) { + timelib_update_ts(o2-time, o2-time-tz_info); + } + + return (o1-time-sse == o2-time-sse) ? 0 : ((o1-time-sse o2-time-sse) ? -1 : 1); + } + + return 1; +} + static inline zend_object_value date_object_new_timezone_ex(zend_class_entry *class_type, php_timezone_obj **ptr TSRMLS_DC) { php_timezone_obj *intern; -- 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/date php_date.c
mikeMon Mar 5 14:05:55 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/date php_date.c Log: - fix bug #40691: add comparison object handler http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.41r2=1.43.2.45.2.42diff_format=u Index: php-src/ext/date/php_date.c diff -u php-src/ext/date/php_date.c:1.43.2.45.2.41 php-src/ext/date/php_date.c:1.43.2.45.2.42 --- php-src/ext/date/php_date.c:1.43.2.45.2.41 Tue Feb 27 03:04:39 2007 +++ php-src/ext/date/php_date.c Mon Mar 5 14:05:55 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_date.c,v 1.43.2.45.2.41 2007/02/27 03:04:39 iliaa Exp $ */ +/* $Id: php_date.c,v 1.43.2.45.2.42 2007/03/05 14:05:55 mike Exp $ */ #include php.h #include php_streams.h @@ -297,6 +297,7 @@ static zend_object_value date_object_new_date(zend_class_entry *class_type TSRMLS_DC); static zend_object_value date_object_new_timezone(zend_class_entry *class_type TSRMLS_DC); static zend_object_value date_object_clone_date(zval *this_ptr TSRMLS_DC); +static int date_object_compare_date(zval *d1, zval *d2 TSRMLS_DC); static zend_object_value date_object_clone_timezone(zval *this_ptr TSRMLS_DC); /* This is need to ensure that session extension request shutdown occurs 1st, because it uses the date extension */ @@ -1459,6 +1460,7 @@ date_ce_date = zend_register_internal_class_ex(ce_date, NULL, NULL TSRMLS_CC); memcpy(date_object_handlers_date, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); date_object_handlers_date.clone_obj = date_object_clone_date; + date_object_handlers_date.compare_objects = date_object_compare_date; #define REGISTER_DATE_CLASS_CONST_STRING(const_name, value) \ zend_declare_class_constant_stringl(date_ce_date, const_name, sizeof(const_name)-1, value, sizeof(value)-1 TSRMLS_CC); @@ -1530,6 +1532,27 @@ return new_ov; } +static int date_object_compare_date(zval *d1, zval *d2 TSRMLS_DC) +{ + if (Z_TYPE_P(d1) == IS_OBJECT Z_TYPE_P(d2) == IS_OBJECT + instanceof_function(Z_OBJCE_P(d1), date_ce_date TSRMLS_CC) + instanceof_function(Z_OBJCE_P(d2), date_ce_date TSRMLS_CC)) { + php_date_obj *o1 = zend_object_store_get_object(d1 TSRMLS_CC); + php_date_obj *o2 = zend_object_store_get_object(d2 TSRMLS_CC); + + if (!o1-time-sse_uptodate) { + timelib_update_ts(o1-time, o1-time-tz_info); + } + if (!o2-time-sse_uptodate) { + timelib_update_ts(o2-time, o2-time-tz_info); + } + + return (o1-time-sse == o2-time-sse) ? 0 : ((o1-time-sse o2-time-sse) ? -1 : 1); + } + + return 1; +} + static inline zend_object_value date_object_new_timezone_ex(zend_class_entry *class_type, php_timezone_obj **ptr TSRMLS_DC) { php_timezone_obj *intern; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/date php_date.c
mikeMon Mar 5 14:10:05 2007 UTC Modified files: /php-src/ext/date php_date.c Log: - fix ws as requested by derick http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.132r2=1.133diff_format=u Index: php-src/ext/date/php_date.c diff -u php-src/ext/date/php_date.c:1.132 php-src/ext/date/php_date.c:1.133 --- php-src/ext/date/php_date.c:1.132 Mon Mar 5 14:05:31 2007 +++ php-src/ext/date/php_date.c Mon Mar 5 14:10:05 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_date.c,v 1.132 2007/03/05 14:05:31 mike Exp $ */ +/* $Id: php_date.c,v 1.133 2007/03/05 14:10:05 mike Exp $ */ #include php.h #include php_streams.h @@ -1664,9 +1664,9 @@ static int date_object_compare_date(zval *d1, zval *d2 TSRMLS_DC) { - if (Z_TYPE_P(d1) == IS_OBJECT Z_TYPE_P(d2) == IS_OBJECT - instanceof_function(Z_OBJCE_P(d1), date_ce_date TSRMLS_CC) - instanceof_function(Z_OBJCE_P(d2), date_ce_date TSRMLS_CC)) { + if (Z_TYPE_P(d1) == IS_OBJECT Z_TYPE_P(d2) == IS_OBJECT + instanceof_function(Z_OBJCE_P(d1), date_ce_date TSRMLS_CC) + instanceof_function(Z_OBJCE_P(d2), date_ce_date TSRMLS_CC)) { php_date_obj *o1 = zend_object_store_get_object(d1 TSRMLS_CC); php_date_obj *o2 = zend_object_store_get_object(d2 TSRMLS_CC); -- 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/date php_date.c
mikeMon Mar 5 14:10:18 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/date php_date.c Log: - fix ws as requested by derick http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.42r2=1.43.2.45.2.43diff_format=u Index: php-src/ext/date/php_date.c diff -u php-src/ext/date/php_date.c:1.43.2.45.2.42 php-src/ext/date/php_date.c:1.43.2.45.2.43 --- php-src/ext/date/php_date.c:1.43.2.45.2.42 Mon Mar 5 14:05:55 2007 +++ php-src/ext/date/php_date.c Mon Mar 5 14:10:18 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_date.c,v 1.43.2.45.2.42 2007/03/05 14:05:55 mike Exp $ */ +/* $Id: php_date.c,v 1.43.2.45.2.43 2007/03/05 14:10:18 mike Exp $ */ #include php.h #include php_streams.h @@ -1534,9 +1534,9 @@ static int date_object_compare_date(zval *d1, zval *d2 TSRMLS_DC) { - if (Z_TYPE_P(d1) == IS_OBJECT Z_TYPE_P(d2) == IS_OBJECT - instanceof_function(Z_OBJCE_P(d1), date_ce_date TSRMLS_CC) - instanceof_function(Z_OBJCE_P(d2), date_ce_date TSRMLS_CC)) { + if (Z_TYPE_P(d1) == IS_OBJECT Z_TYPE_P(d2) == IS_OBJECT + instanceof_function(Z_OBJCE_P(d1), date_ce_date TSRMLS_CC) + instanceof_function(Z_OBJCE_P(d2), date_ce_date TSRMLS_CC)) { php_date_obj *o1 = zend_object_store_get_object(d1 TSRMLS_CC); php_date_obj *o2 = zend_object_store_get_object(d2 TSRMLS_CC); -- 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
mikeMon Mar 5 14:10:27 2007 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS Log: BFN http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.572r2=1.2027.2.547.2.573diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.572 php-src/NEWS:1.2027.2.547.2.573 --- php-src/NEWS:1.2027.2.547.2.572 Sun Mar 4 18:24:49 2007 +++ php-src/NEWSMon Mar 5 14:10:27 2007 @@ -18,6 +18,7 @@ (Ilia) - Fixed bug #40703 (Resolved a possible namespace conflict between libxmlrpc and MySQL's NDB table handler). (Ilia) +- Fixed bug #40961 (Incorrect results of DateTime equality check). (Mike) - Fixed bug #40678 (Cross compilation fails). (Tony) - Fixed bug #40621 (Crash when constructor called inappropriately). (Tony) - Fixed bug #40609 (Segfaults when using more than one SoapVar in a request). -- 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/com_dotnet com_extension.c com_wrapper.c php_com_dotnet.h
wharmby Mon Mar 5 15:49:00 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/com_dotnet com_wrapper.c com_extension.c php_com_dotnet.h /php-srcNEWS Log: Fixed bug #35872 (Prevent object store references during RSHUTDOWN) http://cvs.php.net/viewvc.cgi/php-src/ext/com_dotnet/com_wrapper.c?r1=1.9.2.1.2.4r2=1.9.2.1.2.5diff_format=u Index: php-src/ext/com_dotnet/com_wrapper.c diff -u php-src/ext/com_dotnet/com_wrapper.c:1.9.2.1.2.4 php-src/ext/com_dotnet/com_wrapper.c:1.9.2.1.2.5 --- php-src/ext/com_dotnet/com_wrapper.c:1.9.2.1.2.4Sat Feb 24 02:17:24 2007 +++ php-src/ext/com_dotnet/com_wrapper.cMon Mar 5 15:49:00 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: com_wrapper.c,v 1.9.2.1.2.4 2007/02/24 02:17:24 helly Exp $ */ +/* $Id: com_wrapper.c,v 1.9.2.1.2.5 2007/03/05 15:49:00 wharmby Exp $ */ /* This module exports a PHP object as a COM object by wrapping it * using IDispatchEx */ @@ -92,13 +92,17 @@ # define TSRMLS_FIXED() #endif -#define FETCH_DISP(methname) \ - TSRMLS_FIXED() \ - php_dispatchex *disp = (php_dispatchex*)This; \ - trace( PHP:%s %s\n, Z_OBJCE_P(disp-object)-name, methname); \ - if (GetCurrentThreadId() != disp-engine_thread) \ - return RPC_E_WRONG_THREAD; - +#define FETCH_DISP(methname) \ + TSRMLS_FIXED() \ + php_dispatchex *disp = (php_dispatchex*)This; \ + if (COMG(rshutdown_started)) { \ + trace( PHP Object:%p (name:unknown) %s\n, disp-object, methname); \ + } else { \ + trace( PHP Object:%p (name:%s) %s\n, disp-object, Z_OBJCE_P(disp-object)-name, methname); \ + } \ + if (GetCurrentThreadId() != disp-engine_thread) { \ + return RPC_E_WRONG_THREAD; \ + } static HRESULT STDMETHODCALLTYPE disp_queryinterface( IDispatchEx *This, @@ -534,7 +538,7 @@ { php_dispatchex *disp = (php_dispatchex*)CoTaskMemAlloc(sizeof(php_dispatchex)); - trace(constructing a COM proxy\n); + trace(constructing a COM wrapper for PHP object %p (%s)\n, object, Z_OBJCE_P(object)-name); if (disp == NULL) return NULL; @@ -559,8 +563,13 @@ { TSRMLS_FETCH(); - trace(destroying COM wrapper for PHP object %s\n, Z_OBJCE_P(disp-object)-name); - + /* Object store not available during request shutdown */ + if (COMG(rshutdown_started)) { + trace(destroying COM wrapper for PHP object %p (name:unknown)\n, disp-object); + } else { + trace(destroying COM wrapper for PHP object %p (name:%s)\n, disp-object, Z_OBJCE_P(disp-object)-name); + } + disp-id = 0; if (disp-refcount 0) http://cvs.php.net/viewvc.cgi/php-src/ext/com_dotnet/com_extension.c?r1=1.17.2.2.2.5r2=1.17.2.2.2.6diff_format=u Index: php-src/ext/com_dotnet/com_extension.c diff -u php-src/ext/com_dotnet/com_extension.c:1.17.2.2.2.5 php-src/ext/com_dotnet/com_extension.c:1.17.2.2.2.6 --- php-src/ext/com_dotnet/com_extension.c:1.17.2.2.2.5 Mon Jan 1 09:35:48 2007 +++ php-src/ext/com_dotnet/com_extension.c Mon Mar 5 15:49:00 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: com_extension.c,v 1.17.2.2.2.5 2007/01/01 09:35:48 sebastian Exp $ */ +/* $Id: com_extension.c,v 1.17.2.2.2.6 2007/03/05 15:49:00 wharmby Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -315,6 +315,7 @@ */ PHP_RINIT_FUNCTION(com_dotnet) { + COMG(rshutdown_started) = 0; return SUCCESS; } /* }}} */ @@ -328,6
[PHP-CVS] cvs: php-src / NEWS
wharmby Mon Mar 5 15:53:09 2007 UTC Modified files: /php-srcNEWS Log: Remove bug entry for 35872 as now in 5.2 http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2141r2=1.2142diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2141 php-src/NEWS:1.2142 --- php-src/NEWS:1.2141 Mon Mar 5 12:56:26 2007 +++ php-src/NEWSMon Mar 5 15:53:09 2007 @@ -58,6 +58,5 @@ - Added shm_has_var() function. (Mike) - Added str_getcsv() function. (Sara) - Added ext/hash support to ext/session's ID generator. (Sara) -- Fixed bug #35872 (Prevent object store references during RSHUTDOWN) (Andy) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /sapi/nsapi nsapi.c
thetaphiMon Mar 5 16:28:39 2007 UTC Modified files: /php-src/sapi/nsapi nsapi.c Log: snprintf patch http://cvs.php.net/viewvc.cgi/php-src/sapi/nsapi/nsapi.c?r1=1.78r2=1.79diff_format=u Index: php-src/sapi/nsapi/nsapi.c diff -u php-src/sapi/nsapi/nsapi.c:1.78 php-src/sapi/nsapi/nsapi.c:1.79 --- php-src/sapi/nsapi/nsapi.c:1.78 Sat Feb 24 16:25:55 2007 +++ php-src/sapi/nsapi/nsapi.c Mon Mar 5 16:28:39 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: nsapi.c,v 1.78 2007/02/24 16:25:55 helly Exp $ */ +/* $Id: nsapi.c,v 1.79 2007/03/05 16:28:39 thetaphi Exp $ */ /* * PHP includes @@ -310,7 +310,7 @@ PHP_MINFO_FUNCTION(nsapi) { php_info_print_table_start(); - php_info_print_table_row(2, NSAPI Module Revision, $Revision: 1.78 $); + php_info_print_table_row(2, NSAPI Module Revision, $Revision: 1.79 $); php_info_print_table_row(2, Server Software, system_version()); php_info_print_table_row(2, Sub-requests with nsapi_virtual(), (nsapi_servact_service)?((zend_ini_long(zlib.output_compression, sizeof(zlib.output_compression), 0))?not supported with zlib.output_compression:enabled):not supported on this platform ); @@ -638,7 +638,7 @@ nsapi_free(value); } - snprintf(buf, sizeof(buf), %d, conf_getglobals()-Vport); + snprintf(buf, NS_BUF_SIZE, %d, conf_getglobals()-Vport); php_register_variable(SERVER_PORT, buf, track_vars_array TSRMLS_CC); php_register_variable(SERVER_NAME, conf_getglobals()-Vserver_hostname, track_vars_array TSRMLS_CC); @@ -691,7 +691,7 @@ /* special variables in error mode */ if (rc-http_error) { - snprintf(buf, sizeof(buf), %d, rc-http_error); + snprintf(buf, NS_BUF_SIZE, %d, rc-http_error); php_register_variable(ERROR_TYPE, buf, track_vars_array TSRMLS_CC); } } -- 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) /sapi/nsapi nsapi.c
thetaphiMon Mar 5 16:29:18 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/nsapi nsapi.c Log: snprintf patch http://cvs.php.net/viewvc.cgi/php-src/sapi/nsapi/nsapi.c?r1=1.69.2.3.2.2r2=1.69.2.3.2.3diff_format=u Index: php-src/sapi/nsapi/nsapi.c diff -u php-src/sapi/nsapi/nsapi.c:1.69.2.3.2.2 php-src/sapi/nsapi/nsapi.c:1.69.2.3.2.3 --- php-src/sapi/nsapi/nsapi.c:1.69.2.3.2.2 Sat Feb 24 02:17:28 2007 +++ php-src/sapi/nsapi/nsapi.c Mon Mar 5 16:29:18 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: nsapi.c,v 1.69.2.3.2.2 2007/02/24 02:17:28 helly Exp $ */ +/* $Id: nsapi.c,v 1.69.2.3.2.3 2007/03/05 16:29:18 thetaphi Exp $ */ /* * PHP includes @@ -310,7 +310,7 @@ PHP_MINFO_FUNCTION(nsapi) { php_info_print_table_start(); - php_info_print_table_row(2, NSAPI Module Revision, $Revision: 1.69.2.3.2.2 $); + php_info_print_table_row(2, NSAPI Module Revision, $Revision: 1.69.2.3.2.3 $); php_info_print_table_row(2, Server Software, system_version()); php_info_print_table_row(2, Sub-requests with nsapi_virtual(), (nsapi_servact_service)?((zend_ini_long(zlib.output_compression, sizeof(zlib.output_compression), 0))?not supported with zlib.output_compression:enabled):not supported on this platform ); @@ -642,7 +642,7 @@ nsapi_free(value); } - snprintf(buf, sizeof(buf), %d, conf_getglobals()-Vport); + snprintf(buf, NS_BUF_SIZE, %d, conf_getglobals()-Vport); php_register_variable(SERVER_PORT, buf, track_vars_array TSRMLS_CC); php_register_variable(SERVER_NAME, conf_getglobals()-Vserver_hostname, track_vars_array TSRMLS_CC); @@ -695,7 +695,7 @@ /* special variables in error mode */ if (rc-http_error) { - snprintf(buf, sizeof(buf), %d, rc-http_error); + snprintf(buf, NS_BUF_SIZE, %d, rc-http_error); php_register_variable(ERROR_TYPE, buf, track_vars_array TSRMLS_CC); } } -- 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/fdf fdf.c
stasMon Mar 5 21:54:46 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/fdffdf.c Log: use safe_emalloc http://cvs.php.net/viewvc.cgi/php-src/ext/fdf/fdf.c?r1=1.89.2.2.2.8r2=1.89.2.2.2.9diff_format=u Index: php-src/ext/fdf/fdf.c diff -u php-src/ext/fdf/fdf.c:1.89.2.2.2.8 php-src/ext/fdf/fdf.c:1.89.2.2.2.9 --- php-src/ext/fdf/fdf.c:1.89.2.2.2.8 Wed Jan 3 04:05:12 2007 +++ php-src/ext/fdf/fdf.c Mon Mar 5 21:54:46 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: fdf.c,v 1.89.2.2.2.8 2007/01/03 04:05:12 iliaa Exp $ */ +/* $Id: fdf.c,v 1.89.2.2.2.9 2007/03/05 21:54:46 stas Exp $ */ /* FdfTk lib 2.0 is a Complete C/C++ FDF Toolkit available from http://beta1.adobe.com/ada/acrosdk/forms.html. */ @@ -1105,7 +1105,7 @@ RETVAL_FALSE; goto err; } - buf = emalloc(stat.st_size +1); + buf = safe_emalloc(1, stat.st_size, 1); fread(buf, stat.st_size, 1, fp); buf[stat.st_size] = '\0'; fclose(fp); -- 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) /ext/xmlrpc/libxmlrpc xml_to_soap.c
stasMon Mar 5 21:56:33 2007 UTC Modified files: (Branch: PHP_4_4) /php-src/ext/xmlrpc/libxmlrpc xml_to_soap.c Log: MF5: increase array size to fit buffer size http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/libxmlrpc/xml_to_soap.c?r1=1.3.4.1r2=1.3.4.1.4.1diff_format=u Index: php-src/ext/xmlrpc/libxmlrpc/xml_to_soap.c diff -u php-src/ext/xmlrpc/libxmlrpc/xml_to_soap.c:1.3.4.1 php-src/ext/xmlrpc/libxmlrpc/xml_to_soap.c:1.3.4.1.4.1 --- php-src/ext/xmlrpc/libxmlrpc/xml_to_soap.c:1.3.4.1 Tue Apr 27 17:34:05 2004 +++ php-src/ext/xmlrpc/libxmlrpc/xml_to_soap.c Mon Mar 5 21:56:33 2007 @@ -75,7 +75,7 @@ } struct array_info { - char kids_type[30]; + char kids_type[128]; unsigned long size; /* ... ? */ }; -- 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) /sapi/apache php_apache.c
stasMon Mar 5 21:59:03 2007 UTC Modified files: (Branch: PHP_4_4) /php-src/sapi/apachephp_apache.c Log: MF5: use snprintf http://cvs.php.net/viewvc.cgi/php-src/sapi/apache/php_apache.c?r1=1.69.2.5.4.3r2=1.69.2.5.4.4diff_format=u Index: php-src/sapi/apache/php_apache.c diff -u php-src/sapi/apache/php_apache.c:1.69.2.5.4.3 php-src/sapi/apache/php_apache.c:1.69.2.5.4.4 --- php-src/sapi/apache/php_apache.c:1.69.2.5.4.3 Mon Jan 1 09:46:51 2007 +++ php-src/sapi/apache/php_apache.cMon Mar 5 21:59:02 2007 @@ -17,7 +17,7 @@ | David Sklar [EMAIL PROTECTED] | +--+ */ -/* $Id: php_apache.c,v 1.69.2.5.4.3 2007/01/01 09:46:51 sebastian Exp $ */ +/* $Id: php_apache.c,v 1.69.2.5.4.4 2007/03/05 21:59:02 stas Exp $ */ #include php_apache_http.h @@ -201,10 +201,10 @@ #endif sprintf(output_buf, %d, MODULE_MAGIC_NUMBER); php_info_print_table_row(2, Apache API Version, output_buf); - sprintf(output_buf, %s:%u, serv-server_hostname, serv-port); + snprintf(output_buf, sizeof(output_buf), %s:%u, serv-server_hostname, serv-port); php_info_print_table_row(2, Hostname:Port, output_buf); #if !defined(WIN32) !defined(WINNT) - sprintf(output_buf, %s(%d)/%d, user_name, (int)user_id, (int)group_id); + snprintf(output_buf, sizeof(output_buf), %s(%d)/%d, user_name, (int)user_id, (int)group_id); php_info_print_table_row(2, User/Group, output_buf); sprintf(output_buf, Per Child: %d - Keep Alive: %s - Max Per Connection: %d, max_requests_per_child, serv-keep_alive ? on:off, serv-keep_alive_max); php_info_print_table_row(2, Max Requests, output_buf); -- 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/interbase ibase_service.c
stasTue Mar 6 00:24:01 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/interbase ibase_service.c Log: fix broken snprintf code http://cvs.php.net/viewvc.cgi/php-src/ext/interbase/ibase_service.c?r1=1.11.2.2.2.4r2=1.11.2.2.2.5diff_format=u Index: php-src/ext/interbase/ibase_service.c diff -u php-src/ext/interbase/ibase_service.c:1.11.2.2.2.4 php-src/ext/interbase/ibase_service.c:1.11.2.2.2.5 --- php-src/ext/interbase/ibase_service.c:1.11.2.2.2.4 Tue Feb 27 03:04:40 2007 +++ php-src/ext/interbase/ibase_service.c Tue Mar 6 00:24:00 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: ibase_service.c,v 1.11.2.2.2.4 2007/02/27 03:04:40 iliaa Exp $ */ +/* $Id: ibase_service.c,v 1.11.2.2.2.5 2007/03/06 00:24:00 stas Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -322,7 +322,7 @@ heap_p = heap_buf + res_size; } result += 2; - snprintf(heap_p, sizeof(heap_buf_size), %s\n, result); + snprintf(heap_p, heap_buf_size - (heap_buf - heap_p), %s\n, result); heap_p += line_len +2; goto query_loop; /* repeat until result is exhausted */ -- 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/pdo pdo_sql_parser.c pdo_sql_parser.re
iliaa Tue Mar 6 00:52:55 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/pdopdo_sql_parser.c pdo_sql_parser.re /php-srcNEWS Log: Fixed bug #40417 (Allow multiple instances of the same named PDO token in prepared statement emulation code). http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_sql_parser.c?r1=1.35.2.6.2.10r2=1.35.2.6.2.11diff_format=u Index: php-src/ext/pdo/pdo_sql_parser.c diff -u php-src/ext/pdo/pdo_sql_parser.c:1.35.2.6.2.10 php-src/ext/pdo/pdo_sql_parser.c:1.35.2.6.2.11 --- php-src/ext/pdo/pdo_sql_parser.c:1.35.2.6.2.10 Fri Feb 2 00:03:33 2007 +++ php-src/ext/pdo/pdo_sql_parser.cTue Mar 6 00:52:55 2007 @@ -1,4 +1,4 @@ -/* Generated by re2c 0.11.0 on Thu Feb 1 19:01:11 2007 */ +/* Generated by re2c 0.11.0 on Mon Mar 5 19:42:28 2007 */ #line 1 ext/pdo/pdo_sql_parser.re /* +--+ @@ -18,7 +18,7 @@ +--+ */ -/* $Id: pdo_sql_parser.c,v 1.35.2.6.2.10 2007/02/02 00:03:33 iliaa Exp $ */ +/* $Id: pdo_sql_parser.c,v 1.35.2.6.2.11 2007/03/06 00:52:55 iliaa Exp $ */ #include php.h #include php_pdo_driver.h @@ -280,13 +280,25 @@ } if (params bindno != zend_hash_num_elements(params) stmt-supports_placeholders == PDO_PLACEHOLDER_NONE) { + /* extra bit of validation for instances when same params are bound more then once */ + if (query_type != PDO_PLACEHOLDER_POSITIONAL bindno zend_hash_num_elements(params)) { + int ok = 1; + for (plc = placeholders; plc; plc = plc-next) { + if (zend_hash_find(params, plc-pos, plc-len, (void**) param) == FAILURE) { + ok = 0; + break; + } + } + if (ok) { + goto safe; + } + } pdo_raise_impl_error(stmt-dbh, stmt, HY093, number of bound variables does not match number of tokens TSRMLS_CC); ret = -1; goto clean_up; } - +safe: /* what are we going to do ? */ - if (stmt-supports_placeholders == PDO_PLACEHOLDER_NONE) { /* query generation */ http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_sql_parser.re?r1=1.28.2.4.2.7r2=1.28.2.4.2.8diff_format=u Index: php-src/ext/pdo/pdo_sql_parser.re diff -u php-src/ext/pdo/pdo_sql_parser.re:1.28.2.4.2.7 php-src/ext/pdo/pdo_sql_parser.re:1.28.2.4.2.8 --- php-src/ext/pdo/pdo_sql_parser.re:1.28.2.4.2.7 Thu Feb 1 00:12:39 2007 +++ php-src/ext/pdo/pdo_sql_parser.re Tue Mar 6 00:52:55 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: pdo_sql_parser.re,v 1.28.2.4.2.7 2007/02/01 00:12:39 iliaa Exp $ */ +/* $Id: pdo_sql_parser.re,v 1.28.2.4.2.8 2007/03/06 00:52:55 iliaa Exp $ */ #include php.h #include php_pdo_driver.h @@ -155,13 +155,25 @@ } if (params bindno != zend_hash_num_elements(params) stmt-supports_placeholders == PDO_PLACEHOLDER_NONE) { + /* extra bit of validation for instances when same params are bound more then once */ + if (query_type != PDO_PLACEHOLDER_POSITIONAL bindno zend_hash_num_elements(params)) { + int ok = 1; + for (plc = placeholders; plc; plc = plc-next) { + if (zend_hash_find(params, plc-pos, plc-len, (void**) param) == FAILURE) { + ok = 0; + break; + } + } + if (ok) { + goto safe; + } + } pdo_raise_impl_error(stmt-dbh, stmt, HY093, number of bound variables does not match number of tokens TSRMLS_CC); ret = -1; goto clean_up; } - +safe: /* what are we going to do ? */ - if (stmt-supports_placeholders == PDO_PLACEHOLDER_NONE) { /* query generation */ http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.574r2=1.2027.2.547.2.575diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.574 php-src/NEWS:1.2027.2.547.2.575 --- php-src/NEWS:1.2027.2.547.2.574 Mon Mar 5 15:49:00 2007 +++ php-src/NEWSTue Mar 6 00:52:55 2007 @@ -52,6 +52,8 @@ - Fixed bug #40451 (addAttribute() may crash when used with non-existent child node). (Tony) - Fixed bug #40428 (imagepstext() doesn't accept optional parameter). (Pierre) +- Fixed bug #40417 (Allow multiple instances of the same named PDO token in + prepared statement emulation code).
[PHP-CVS] cvs: php-src /ext/mbstring/oniguruma regposerr.c
helly Tue Mar 6 00:55:46 2007 UTC Modified files: /php-src/ext/mbstring/oniguruma regposerr.c Log: - Revert back to sprintf (we could define snprintf for windows but we don't) http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/oniguruma/regposerr.c?r1=1.4r2=1.5diff_format=u Index: php-src/ext/mbstring/oniguruma/regposerr.c diff -u php-src/ext/mbstring/oniguruma/regposerr.c:1.4 php-src/ext/mbstring/oniguruma/regposerr.c:1.5 --- php-src/ext/mbstring/oniguruma/regposerr.c:1.4 Sat Feb 24 16:25:54 2007 +++ php-src/ext/mbstring/oniguruma/regposerr.c Tue Mar 6 00:55:46 2007 @@ -76,7 +76,7 @@ s = ; } else { -snprintf(tbuf, sizeof(tbuf), undefined error code (%d), posix_ecode); +sprintf(tbuf, undefined error code (%d), posix_ecode); s = tbuf; } -- 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/mbstring/oniguruma regposerr.c
helly Tue Mar 6 00:56:42 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/mbstring/oniguruma regposerr.c Log: - MFH Revert back to sprintf (we could define snprintf for windows but we don't) http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/oniguruma/regposerr.c?r1=1.3.4.1r2=1.3.4.2diff_format=u Index: php-src/ext/mbstring/oniguruma/regposerr.c diff -u php-src/ext/mbstring/oniguruma/regposerr.c:1.3.4.1 php-src/ext/mbstring/oniguruma/regposerr.c:1.3.4.2 --- php-src/ext/mbstring/oniguruma/regposerr.c:1.3.4.1 Sat Feb 24 02:17:24 2007 +++ php-src/ext/mbstring/oniguruma/regposerr.c Tue Mar 6 00:56:42 2007 @@ -76,7 +76,7 @@ s = ; } else { -snprintf(tbuf, sizeof(tbuf), undefined error code (%d), posix_ecode); +sprintf(tbuf, sizeof(tbuf), undefined error code (%d), posix_ecode); s = tbuf; } -- 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/mbstring/oniguruma regposerr.c
This is not going to work - sprintf has format as second parameter. Also, I thought PHP does define snprintf for Windows? Marcus Boerger wrote: helly Tue Mar 6 00:56:42 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/mbstring/oniguruma regposerr.c Log: - MFH Revert back to sprintf (we could define snprintf for windows but we don't) http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/oniguruma/regposerr.c?r1=1.3.4.1r2=1.3.4.2diff_format=u Index: php-src/ext/mbstring/oniguruma/regposerr.c diff -u php-src/ext/mbstring/oniguruma/regposerr.c:1.3.4.1 php-src/ext/mbstring/oniguruma/regposerr.c:1.3.4.2 --- php-src/ext/mbstring/oniguruma/regposerr.c:1.3.4.1 Sat Feb 24 02:17:24 2007 +++ php-src/ext/mbstring/oniguruma/regposerr.c Tue Mar 6 00:56:42 2007 @@ -76,7 +76,7 @@ s = ; } else { -snprintf(tbuf, sizeof(tbuf), undefined error code (%d), posix_ecode); +sprintf(tbuf, sizeof(tbuf), undefined error code (%d), posix_ecode); s = tbuf; } -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ -- 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/mbstring/oniguruma regposerr.c
Hello Stanislav, right, thanks and fixed. Tuesday, March 6, 2007, 2:00:04 AM, you wrote: This is not going to work - sprintf has format as second parameter. Also, I thought PHP does define snprintf for Windows? Marcus Boerger wrote: helly Tue Mar 6 00:56:42 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/mbstring/oniguruma regposerr.c Log: - MFH Revert back to sprintf (we could define snprintf for windows but we don't) http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/oniguruma/regposerr.c?r1=1.3.4.1r2=1.3.4.2diff_format=u Index: php-src/ext/mbstring/oniguruma/regposerr.c diff -u php-src/ext/mbstring/oniguruma/regposerr.c:1.3.4.1 php-src/ext/mbstring/oniguruma/regposerr.c:1.3.4.2 --- php-src/ext/mbstring/oniguruma/regposerr.c:1.3.4.1Sat Feb 24 02:17:24 2007 +++ php-src/ext/mbstring/oniguruma/regposerr.cTue Mar 6 00:56:42 2007 @@ -76,7 +76,7 @@ s = ; } else { -snprintf(tbuf, sizeof(tbuf), undefined error code (%d), posix_ecode); +sprintf(tbuf, sizeof(tbuf), undefined error code (%d), posix_ecode); s = tbuf; } Best regards, Marcus -- 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/mbstring/oniguruma regversion.c
helly Tue Mar 6 01:13:22 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/mbstring/oniguruma regversion.c Log: - More to go # CVS sucks, you cannot mix -D with -r # However, thanks edin for reminding me that we have mini version tags # I still prefer subverison. There we don't have any problem of this kind http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/oniguruma/regversion.c?r1=1.1.6.3r2=1.1.6.4diff_format=u Index: php-src/ext/mbstring/oniguruma/regversion.c diff -u php-src/ext/mbstring/oniguruma/regversion.c:1.1.6.3 php-src/ext/mbstring/oniguruma/regversion.c:1.1.6.4 --- php-src/ext/mbstring/oniguruma/regversion.c:1.1.6.3 Sat Feb 24 02:17:24 2007 +++ php-src/ext/mbstring/oniguruma/regversion.c Tue Mar 6 01:13:21 2007 @@ -35,7 +35,7 @@ { static char s[12]; - snprintf(s, sizeof(s), %d.%d.%d, + sprintf(s, sizeof(s), %d.%d.%d, ONIGURUMA_VERSION_MAJOR, ONIGURUMA_VERSION_MINOR, ONIGURUMA_VERSION_TEENY); @@ -47,7 +47,7 @@ { static char s[58]; - snprintf(s, sizeof(s), Oniguruma %d.%d.%d : Copyright (C) 2002-2007 K.Kosako, + sprintf(s, sizeof(s), Oniguruma %d.%d.%d : Copyright (C) 2002-2007 K.Kosako, ONIGURUMA_VERSION_MAJOR, ONIGURUMA_VERSION_MINOR, ONIGURUMA_VERSION_TEENY); -- 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/mbstring/oniguruma regversion.c
helly Tue Mar 6 01:14:38 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/mbstring/oniguruma regversion.c Log: - And the sizes too http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/oniguruma/regversion.c?r1=1.1.6.4r2=1.1.6.5diff_format=u Index: php-src/ext/mbstring/oniguruma/regversion.c diff -u php-src/ext/mbstring/oniguruma/regversion.c:1.1.6.4 php-src/ext/mbstring/oniguruma/regversion.c:1.1.6.5 --- php-src/ext/mbstring/oniguruma/regversion.c:1.1.6.4 Tue Mar 6 01:13:21 2007 +++ php-src/ext/mbstring/oniguruma/regversion.c Tue Mar 6 01:14:38 2007 @@ -35,7 +35,7 @@ { static char s[12]; - sprintf(s, sizeof(s), %d.%d.%d, + sprintf(s, %d.%d.%d, ONIGURUMA_VERSION_MAJOR, ONIGURUMA_VERSION_MINOR, ONIGURUMA_VERSION_TEENY); @@ -47,7 +47,7 @@ { static char s[58]; - sprintf(s, sizeof(s), Oniguruma %d.%d.%d : Copyright (C) 2002-2007 K.Kosako, + sprintf(s, Oniguruma %d.%d.%d : Copyright (C) 2002-2007 K.Kosako, ONIGURUMA_VERSION_MAJOR, ONIGURUMA_VERSION_MINOR, ONIGURUMA_VERSION_TEENY); -- 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/mbstring/oniguruma regerror.c
helly Tue Mar 6 01:19:48 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/mbstring/oniguruma regerror.c Log: - Revert last part and fix issue under windows http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/oniguruma/regerror.c?r1=1.3.4.7r2=1.3.4.8diff_format=u Index: php-src/ext/mbstring/oniguruma/regerror.c diff -u php-src/ext/mbstring/oniguruma/regerror.c:1.3.4.7 php-src/ext/mbstring/oniguruma/regerror.c:1.3.4.8 --- php-src/ext/mbstring/oniguruma/regerror.c:1.3.4.7 Wed Feb 28 01:10:41 2007 +++ php-src/ext/mbstring/oniguruma/regerror.c Tue Mar 6 01:19:47 2007 @@ -278,7 +278,7 @@ va_init_list(args, fmt); n = vsnprintf((char* )buf, bufsize, (const char* )fmt, args); - if (n = bufsize) { + if (n 0 || n = bufsize) { n = bufsize - 1; } va_end(args); @@ -309,7 +309,7 @@ int blen; while (len-- 0) { -snprintf((char* )bs, sizeof(bs), \\%03o, *p++ 0377); +sprintf((char* )bs, \\%03o, *p++ 0377); blen = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, bs); bp = bs; while (blen-- 0) *s++ = *bp++; @@ -318,7 +318,7 @@ } else if (!ONIGENC_IS_CODE_PRINT(enc, *p) !ONIGENC_IS_CODE_SPACE(enc, *p)) { - snprintf((char* )bs, sizeof(bs), \\%03o, *p++ 0377); + sprintf((char* )bs, \\%03o, *p++ 0377); len = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, bs); bp = bs; while (len-- 0) *s++ = *bp++; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mbstring/oniguruma regerror.c
helly Tue Mar 6 01:21:36 2007 UTC Modified files: /php-src/ext/mbstring/oniguruma regerror.c Log: - Add missing return value check http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/oniguruma/regerror.c?r1=1.3r2=1.4diff_format=u Index: php-src/ext/mbstring/oniguruma/regerror.c diff -u php-src/ext/mbstring/oniguruma/regerror.c:1.3 php-src/ext/mbstring/oniguruma/regerror.c:1.4 --- php-src/ext/mbstring/oniguruma/regerror.c:1.3 Sun Feb 20 22:18:08 2005 +++ php-src/ext/mbstring/oniguruma/regerror.c Tue Mar 6 01:21:36 2007 @@ -276,6 +276,9 @@ va_init_list(args, fmt); n = vsnprintf(buf, bufsize, fmt, args); + if (n 0 || n = bufsize) { +n = bufsize - 1; + } va_end(args); need = (pat_end - pat) * 4 + 4; -- 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/sybase php_sybase_db.c
stasTue Mar 6 02:03:27 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/sybase php_sybase_db.c Log: use safe_erealloc http://cvs.php.net/viewvc.cgi/php-src/ext/sybase/php_sybase_db.c?r1=1.66.2.5.2.3r2=1.66.2.5.2.4diff_format=u Index: php-src/ext/sybase/php_sybase_db.c diff -u php-src/ext/sybase/php_sybase_db.c:1.66.2.5.2.3 php-src/ext/sybase/php_sybase_db.c:1.66.2.5.2.4 --- php-src/ext/sybase/php_sybase_db.c:1.66.2.5.2.3 Sat Feb 24 02:59:57 2007 +++ php-src/ext/sybase/php_sybase_db.c Tue Mar 6 02:03:27 2007 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_sybase_db.c,v 1.66.2.5.2.3 2007/02/24 02:59:57 iliaa Exp $ */ +/* $Id: php_sybase_db.c,v 1.66.2.5.2.4 2007/03/06 02:03:27 stas Exp $ */ #ifdef HAVE_CONFIG_H @@ -839,7 +839,7 @@ while (retvalue!=FAIL retvalue!=NO_MORE_ROWS) { result-num_rows++; if (result-num_rows blocks_initialized*SYBASE_ROWS_BLOCK) { - result-data = (zval ***) erealloc(result-data,sizeof(zval **)*SYBASE_ROWS_BLOCK*(++blocks_initialized)); + result-data = (zval ***) safe_erealloc(result-data, SYBASE_ROWS_BLOCK*(++blocks_initialized), sizeof(zval **), 0); } result-data[i] = (zval **) safe_emalloc(sizeof(zval *), num_fields, 0); for (j=1; j=num_fields; j++) { -- 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/sybase_ct php_sybase_ct.c
stasTue Mar 6 02:07:10 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/sybase_ct php_sybase_ct.c Log: use safe_realloc http://cvs.php.net/viewvc.cgi/php-src/ext/sybase_ct/php_sybase_ct.c?r1=1.103.2.5.2.9r2=1.103.2.5.2.10diff_format=u Index: php-src/ext/sybase_ct/php_sybase_ct.c diff -u php-src/ext/sybase_ct/php_sybase_ct.c:1.103.2.5.2.9 php-src/ext/sybase_ct/php_sybase_ct.c:1.103.2.5.2.10 --- php-src/ext/sybase_ct/php_sybase_ct.c:1.103.2.5.2.9 Sat Feb 24 02:17:27 2007 +++ php-src/ext/sybase_ct/php_sybase_ct.c Tue Mar 6 02:07:10 2007 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_sybase_ct.c,v 1.103.2.5.2.9 2007/02/24 02:17:27 helly Exp $ */ +/* $Id: php_sybase_ct.c,v 1.103.2.5.2.10 2007/03/06 02:07:10 stas Exp $ */ #ifdef HAVE_CONFIG_H @@ -1138,7 +1138,7 @@ result-num_rows++; i= result-store ? result-num_rows- 1 : 0; if (i = result-blocks_initialized*SYBASE_ROWS_BLOCK) { - result-data = (zval **) erealloc(result-data, sizeof(zval *)*SYBASE_ROWS_BLOCK*(++result-blocks_initialized)); + result-data = (zval **) safe_erealloc(result-data, SYBASE_ROWS_BLOCK*(++result-blocks_initialized), sizeof(zval *), 0); } if (result-store || 1 == result-num_rows) { result-data[i] = (zval *) safe_emalloc(sizeof(zval), result-num_fields, 0); -- 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/bz2 bz2.c
stasTue Mar 6 02:10:25 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/bz2bz2.c Log: use safe_realloc http://cvs.php.net/viewvc.cgi/php-src/ext/bz2/bz2.c?r1=1.14.2.3.2.10r2=1.14.2.3.2.11diff_format=u Index: php-src/ext/bz2/bz2.c diff -u php-src/ext/bz2/bz2.c:1.14.2.3.2.10 php-src/ext/bz2/bz2.c:1.14.2.3.2.11 --- php-src/ext/bz2/bz2.c:1.14.2.3.2.10 Mon Jan 1 09:35:48 2007 +++ php-src/ext/bz2/bz2.c Tue Mar 6 02:10:25 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: bz2.c,v 1.14.2.3.2.10 2007/01/01 09:35:48 sebastian Exp $ */ +/* $Id: bz2.c,v 1.14.2.3.2.11 2007/03/06 02:10:25 stas Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -562,13 +562,13 @@ /* compression is better then 2:1, need to allocate more memory */ bzs.avail_out = source_len; size = (bzs.total_out_hi32 * (unsigned int) -1) + bzs.total_out_lo32; - dest = erealloc(dest, size + bzs.avail_out + 1); + dest = safe_erealloc(dest, 1, bzs.avail_out+1, size ); bzs.next_out = dest + size; } if (error == BZ_STREAM_END || error == BZ_OK) { size = (bzs.total_out_hi32 * (unsigned int) -1) + bzs.total_out_lo32; - dest = erealloc(dest, size + 1); + dest = safe_erealloc(dest, 1, size, 1); dest[size] = '\0'; RETVAL_STRINGL(dest, size, 0); } else { /* real error */ -- 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/sqlite sqlite.c
stasTue Mar 6 02:17:13 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/sqlite sqlite.c Log: use safe_realloc http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite/sqlite.c?r1=1.166.2.13.2.6r2=1.166.2.13.2.7diff_format=u Index: php-src/ext/sqlite/sqlite.c diff -u php-src/ext/sqlite/sqlite.c:1.166.2.13.2.6 php-src/ext/sqlite/sqlite.c:1.166.2.13.2.7 --- php-src/ext/sqlite/sqlite.c:1.166.2.13.2.6 Mon Jan 1 09:36:07 2007 +++ php-src/ext/sqlite/sqlite.c Tue Mar 6 02:17:13 2007 @@ -17,7 +17,7 @@ | Marcus Boerger [EMAIL PROTECTED] | +--+ - $Id: sqlite.c,v 1.166.2.13.2.6 2007/01/01 09:36:07 sebastian Exp $ + $Id: sqlite.c,v 1.166.2.13.2.7 2007/03/06 02:17:13 stas Exp $ */ #ifdef HAVE_CONFIG_H @@ -1133,7 +1133,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, SQLite support, enabled); - php_info_print_table_row(2, PECL Module version, PHP_SQLITE_MODULE_VERSION $Id: sqlite.c,v 1.166.2.13.2.6 2007/01/01 09:36:07 sebastian Exp $); + php_info_print_table_row(2, PECL Module version, PHP_SQLITE_MODULE_VERSION $Id: sqlite.c,v 1.166.2.13.2.7 2007/03/06 02:17:13 stas Exp $); php_info_print_table_row(2, SQLite Library, sqlite_libversion()); php_info_print_table_row(2, SQLite Encoding, sqlite_libencoding()); php_info_print_table_end(); @@ -1465,7 +1465,7 @@ /* add the row to our collection */ if (rres-nrows + 1 = rres-alloc_rows) { rres-alloc_rows = rres-alloc_rows ? rres-alloc_rows * 2 : 16; - rres-table = erealloc(rres-table, rres-alloc_rows * rres-ncolumns * sizeof(char *)); + rres-table = safe_erealloc(rres-table, rres-alloc_rows, rres-ncolumns*sizeof(char *), 0); } base = rres-nrows * rres-ncolumns; for (i = 0; i rres-ncolumns; i++) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php