[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Thu Sep 6 01:31:19 2007 UTC Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2799r2=1.2800diff_format=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.2799 php-src/ChangeLog:1.2800 --- php-src/ChangeLog:1.2799Wed Sep 5 01:31:24 2007 +++ php-src/ChangeLog Thu Sep 6 01:31:18 2007 @@ -1,3 +1,68 @@ +2007-09-05 Ilia Alshanetsky [EMAIL PROTECTED] + +* ext/pgsql/pgsql.c: + Fixed typo in function name + +* ext/pgsql/pgsql.c: + + MFB: Fixed bug #41845 (pgsql extension does not compile with PostgreSQL + 7.4) + +* ext/pgsql/pgsql.c: + + MFB: Fixed bug #42506 (php_pgsql_convert() timezone parse bug) + +* ext/standard/dir.c + ext/standard/file.c: + + MFB: Fixed possible buffer overflows inside the fnmatch() and glob() + functions + +2007-09-05 Andrey Hristov [EMAIL PROTECTED] + +* (PHP_5_2) + NEWS + ext/mysqli/mysqli_api.c + ext/mysqli/tests/bug38710.phpt: + Fixed bug #42378 (mysqli_stmt_bind_result memory exhaustion) + Fixed regression of bug 38710. Already fixed in HEAD. + +2007-09-05 Dmitry Stogov [EMAIL PROTECTED] + +* (PHP_5_2) + NEWS + ext/soap/php_soap.h + ext/soap/php_soap.h + ext/soap/soap.c + ext/soap/soap.c + ext/soap/tests/bugs/bug42214.phpt + ext/soap/tests/bugs/bug42214.phpt + ext/soap/tests/bugs/bug42214.phpt: + Fixed bug #42214 (SoapServer sends clients internal PHP errors) + +* ext/soap/tests/bugs/bug42488.phpt + ext/soap/tests/bugs/bug42488.phpt: + + file bug42488.phpt was initially added on branch PHP_5_2. + +* (PHP_5_2) + NEWS + ext/soap/php_encoding.c + ext/soap/soap.c + ext/soap/tests/bugs/bug42488.phpt: + Fixed bug #42488 (SoapServer reports an encoding error and the error itself + breaks). + +* (PHP_5_2) + NEWS + sapi/cgi/cgi_main.c + sapi/cgi/cgi_main.c: + Fixed bug #42523 (PHP_SELF duplicates path) + +* ZendEngine2/zend_compile.c: + Bug #42541 (Check for namespace decl. on first line doesn't work when + extended info is on) + 2007-09-04 Antony Dovgal [EMAIL PROTECTED] * (PHP_5_2)
[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog
changelog Thu Sep 6 01:31:22 2007 UTC Modified files: /ZendEngine2ChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1164r2=1.1165diff_format=u Index: ZendEngine2/ChangeLog diff -u ZendEngine2/ChangeLog:1.1164 ZendEngine2/ChangeLog:1.1165 --- ZendEngine2/ChangeLog:1.1164Wed Sep 5 01:31:27 2007 +++ ZendEngine2/ChangeLog Thu Sep 6 01:31:22 2007 @@ -1,3 +1,9 @@ +2007-09-05 Dmitry Stogov [EMAIL PROTECTED] + +* zend_compile.c: + Bug #42541 (Check for namespace decl. on first line doesn't work when + extended info is on) + 2007-09-04 Antony Dovgal [EMAIL PROTECTED] * (PHP_5_2) @@ -18863,7 +18869,7 @@ 2003-06-10 Jani Taskinen [EMAIL PROTECTED] * zend_multiply.h: - - Missing $Id: ChangeLog,v 1.1164 2007/09/05 01:31:27 changelog Exp $ tag + - Missing $Id: ChangeLog,v 1.1165 2007/09/06 01:31:22 changelog Exp $ tag 2003-06-10 James Cox [EMAIL PROTECTED] @@ -20587,7 +20593,7 @@ zend_types.h zend_variables.c zend_variables.h: - - Added some missing CVS $Id: ChangeLog,v 1.1164 2007/09/05 01:31:27 changelog Exp $ tags, headers and footers. + - Added some missing CVS $Id: ChangeLog,v 1.1165 2007/09/06 01:31:22 changelog Exp $ tags, headers and footers. 2003-01-30 Ilia Alshanetsky [EMAIL PROTECTED]
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /sapi/cgi cgi_main.c
dmitry Wed Sep 5 08:26:32 2007 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/sapi/cgi cgi_main.c Log: Fixed bug #42523 (PHP_SELF duplicates path) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.927r2=1.2027.2.547.2.928diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.927 php-src/NEWS:1.2027.2.547.2.928 --- php-src/NEWS:1.2027.2.547.2.927 Tue Sep 4 18:51:48 2007 +++ php-src/NEWSWed Sep 5 08:26:31 2007 @@ -9,6 +9,7 @@ - Upgraded PCRE to version 7.3 (Nuno) - Added optional parameter $provide_object to debug_backtrace(). (Sebastian) +- Fixed bug #42523 (PHP_SELF duplicates path). (Dmitry) - Fixed bug #42512 (ip2long('255.255.255.255') should return 4294967295 on 64-bit PHP). (Derick) - Fixed bug #42506 (php_pgsql_convert() timezone parse bug) (nonunnet at http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.47r2=1.267.2.15.2.48diff_format=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.47 php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.48 --- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.47 Fri Aug 31 12:17:52 2007 +++ php-src/sapi/cgi/cgi_main.c Wed Sep 5 08:26:32 2007 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: cgi_main.c,v 1.267.2.15.2.47 2007/08/31 12:17:52 dmitry Exp $ */ +/* $Id: cgi_main.c,v 1.267.2.15.2.48 2007/09/05 08:26:32 dmitry Exp $ */ #include php.h #include php_globals.h @@ -778,6 +778,21 @@ char *env_redirect_url = sapi_cgibin_getenv(REDIRECT_URL, sizeof(REDIRECT_URL)-1 TSRMLS_CC); char *env_document_root = sapi_cgibin_getenv(DOCUMENT_ROOT, sizeof(DOCUMENT_ROOT)-1 TSRMLS_CC); + /* Hack for buggy IIS that sets incorrect PATH_INFO */ + char *env_server_software = sapi_cgibin_getenv(SERVER_SOFTWARE, sizeof(SERVER_SOFTWARE)-1 TSRMLS_CC); + if (env_server_software + env_script_name + env_path_info + strncmp(env_server_software, Microsoft-IIS, sizeof(Microsoft-IIS)-1) == 0 + strncmp(env_path_info, env_script_name, strlen(env_script_name)) == 0) { + env_path_info = _sapi_cgibin_putenv(ORIG_PATH_INFO, env_path_info TSRMLS_CC); + env_path_info += strlen(env_script_name); + if (*env_path_info == 0) { + env_path_info = NULL; + } + env_path_info = _sapi_cgibin_putenv(PATH_INFO, env_path_info TSRMLS_CC); + } + if (CGIG(fix_pathinfo)) { char *real_path = NULL; char *orig_path_translated = env_path_translated; -- 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 Wed Sep 5 08:26:49 2007 UTC Modified files: /php-src/sapi/cgi cgi_main.c Log: Fixed bug #42523 (PHP_SELF duplicates path) http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.331r2=1.332diff_format=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.331 php-src/sapi/cgi/cgi_main.c:1.332 --- php-src/sapi/cgi/cgi_main.c:1.331 Fri Aug 31 12:18:04 2007 +++ php-src/sapi/cgi/cgi_main.c Wed Sep 5 08:26:49 2007 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: cgi_main.c,v 1.331 2007/08/31 12:18:04 dmitry Exp $ */ +/* $Id: cgi_main.c,v 1.332 2007/09/05 08:26:49 dmitry Exp $ */ #include php.h #include php_globals.h @@ -751,6 +751,21 @@ char *env_path_info = sapi_cgibin_getenv(PATH_INFO, sizeof(PATH_INFO)-1 TSRMLS_CC); char *env_script_name = sapi_cgibin_getenv(SCRIPT_NAME, sizeof(SCRIPT_NAME)-1 TSRMLS_CC); + /* Hack for buggy IIS that sets incorrect PATH_INFO */ + char *env_server_software = sapi_cgibin_getenv(SERVER_SOFTWARE, sizeof(SERVER_SOFTWARE)-1 TSRMLS_CC); + if (env_server_software + env_script_name + env_path_info + strncmp(env_server_software, Microsoft-IIS, sizeof(Microsoft-IIS)-1) == 0 + strncmp(env_path_info, env_script_name, strlen(env_script_name)) == 0) { + env_path_info = _sapi_cgibin_putenv(ORIG_PATH_INFO, env_path_info TSRMLS_CC); + env_path_info += strlen(env_script_name); + if (*env_path_info == 0) { + env_path_info = NULL; + } + env_path_info = _sapi_cgibin_putenv(PATH_INFO, env_path_info TSRMLS_CC); + } + if (CGIG(fix_pathinfo)) { struct stat st; char *real_path = NULL; -- 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) / NEWS /ext/standard dir.c file.c
This is against the proper procedure. You're supposed to commit first to HEAD then MFH to the appropriate branch. We don't have the luxury of having some divas around here who think they can do whatever they like.. Can someone please revoke Ilia's CVS account? Only committing to a branch and leaving the trunk unpatched is sabotage IMO.. --Jani On Tue, 2007-09-04 at 12:51 +, Ilia Alshanetsky wrote: iliaa Tue Sep 4 12:51:49 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard file.c dir.c /php-src NEWS Log: Fixed possible buffer overflows inside the fnmatch() and glob() functions http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.409.2.6.2.27r2=1.409.2.6.2.28diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.409.2.6.2.27 php-src/ext/standard/file.c:1.409.2.6.2.28 --- php-src/ext/standard/file.c:1.409.2.6.2.27Mon Sep 3 02:53:56 2007 +++ php-src/ext/standard/file.c Tue Sep 4 12:51:49 2007 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.409.2.6.2.27 2007/09/03 02:53:56 iliaa Exp $ */ +/* $Id: file.c,v 1.409.2.6.2.28 2007/09/04 12:51:49 iliaa Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -2518,6 +2518,11 @@ == FAILURE) return; + if (filename_len = MAXPATHLEN) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Filename exceeds the maximum allowed length of %d characters, MAXPATHLEN); + RETURN_FALSE; + } + RETURN_BOOL( ! fnmatch( pattern, filename, flags )); } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dir.c?r1=1.147.2.3.2.10r2=1.147.2.3.2.11diff_format=u Index: php-src/ext/standard/dir.c diff -u php-src/ext/standard/dir.c:1.147.2.3.2.10 php-src/ext/standard/dir.c:1.147.2.3.2.11 --- php-src/ext/standard/dir.c:1.147.2.3.2.10 Wed Aug 22 14:59:44 2007 +++ php-src/ext/standard/dir.cTue Sep 4 12:51:49 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: dir.c,v 1.147.2.3.2.10 2007/08/22 14:59:44 jani Exp $ */ +/* $Id: dir.c,v 1.147.2.3.2.11 2007/09/04 12:51:49 iliaa Exp $ */ /* {{{ includes/startup/misc */ @@ -401,6 +401,11 @@ return; } + if (pattern_len = MAXPATHLEN) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Pattern exceeds the maximum allowed length of %d characters, MAXPATHLEN); + RETURN_FALSE; + } + if ((GLOB_AVAILABLE_FLAGS flags) != flags) { php_error_docref(NULL TSRMLS_CC, E_WARNING, At least one of the passed flags is invalid or not supported on this platform); RETURN_FALSE; http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.925r2=1.2027.2.547.2.926diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.925 php-src/NEWS:1.2027.2.547.2.926 --- php-src/NEWS:1.2027.2.547.2.925 Mon Sep 3 15:36:04 2007 +++ php-src/NEWS Tue Sep 4 12:51:49 2007 @@ -1,6 +1,9 @@ PHP NEWS ||| ?? ??? 20??, PHP 5.2.5 +- Fixed possible buffer overflows inside the fnmatch() and glob() functions + reported by Laurent gaffie (Ilia) + - Upgraded PCRE to version 7.3 (Nuno) - Added optional parameter $provide_object to debug_backtrace(). (Sebastian) -- Make me happy: http://pecl.php.net/wishlist.php/jani -- 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/soap php_encoding.c /ext/soap/tests/bugs bug42488.phpt
dmitry Wed Sep 5 10:18:24 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/soap/tests/bugsbug42488.phpt Modified files: /php-srcNEWS /php-src/ext/soap php_encoding.c Log: Fixed bug #42488 (SoapServer reports an encoding error and the error itself breaks). http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.928r2=1.2027.2.547.2.929diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.928 php-src/NEWS:1.2027.2.547.2.929 --- php-src/NEWS:1.2027.2.547.2.928 Wed Sep 5 08:26:31 2007 +++ php-src/NEWSWed Sep 5 10:18:22 2007 @@ -22,6 +22,8 @@ (Hannes) - Fixed bug #42468 (Write lock on file_get_contents fails when using a compression stream). (Ilia) +- Fixed bug #42488 (SoapServer reports an encoding error and the error itself + breaks). (Dmitry) - Fixed bug #42359 (xsd:list type not parsed). (Dmitry) - Fixed bug #42326 (SoapServer crash). (Dmitry) - Fixed bug #42086 (SoapServer return Procedure '' not present for WSIBasic http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_encoding.c?r1=1.103.2.21.2.36r2=1.103.2.21.2.37diff_format=u Index: php-src/ext/soap/php_encoding.c diff -u php-src/ext/soap/php_encoding.c:1.103.2.21.2.36 php-src/ext/soap/php_encoding.c:1.103.2.21.2.37 --- php-src/ext/soap/php_encoding.c:1.103.2.21.2.36 Fri Aug 31 08:07:27 2007 +++ php-src/ext/soap/php_encoding.c Wed Sep 5 10:18:22 2007 @@ -17,7 +17,7 @@ | Dmitry Stogov [EMAIL PROTECTED] | +--+ */ -/* $Id: php_encoding.c,v 1.103.2.21.2.36 2007/08/31 08:07:27 dmitry Exp $ */ +/* $Id: php_encoding.c,v 1.103.2.21.2.37 2007/09/05 10:18:22 dmitry Exp $ */ #include time.h @@ -864,13 +864,50 @@ efree(str); str = estrdup((char*)xmlBufferContent(out)); new_len = n; - } else if (!php_libxml_xmlCheckUTF8(BAD_CAST(str))) { - soap_error1(E_ERROR, Encoding: string '%s' is not a valid utf-8 string, str); } xmlBufferFree(out); xmlBufferFree(in); - } else if (!php_libxml_xmlCheckUTF8(BAD_CAST(str))) { - soap_error1(E_ERROR, Encoding: string '%s' is not a valid utf-8 string, str); + } + + if (!php_libxml_xmlCheckUTF8(BAD_CAST(str))) { + char *err = emalloc(new_len + 8); + char c; + int i; + + memcpy(err, str, new_len+1); + for (i = 0; (c = err[i++]);) { + if ((c 0x80) == 0) { + } else if ((c 0xe0) == 0xc0) { + if ((err[i] 0xc0) != 0x80) { + break; + } + i++; + } else if ((c 0xf0) == 0xe0) { + if ((err[i] 0xc0) != 0x80 || (err[i+1] 0xc0) != 0x80) { + break; + } + i += 2; + } else if ((c 0xf8) == 0xf0) { + if ((err[i] 0xc0) != 0x80 || (err[i+1] 0xc0) != 0x80 || (err[i+2] 0xc0) != 0x80) { + break; + } + i += 3; + } else { + break; + } + } + if (c) { + err[i-1] = '\\'; + err[i++] = 'x'; + err[i++] = ((unsigned char)c 4) + unsigned char)c 4) 9) ? ('a' - 10) : '0'); + err[i++] = (c 15) + (((c 15) 9) ? ('a' - 10) : '0'); + err[i++] = '.'; + err[i++] = '.'; + err[i++] = '.'; + err[i++] = 0; + } + + soap_error1(E_ERROR, Encoding: string '%s' is not a valid utf-8 string, err); } text = xmlNewTextLen(BAD_CAST(str), new_len); http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug42488.phpt?view=markuprev=1.1 Index: php-src/ext/soap/tests/bugs/bug42488.phpt +++ php-src/ext/soap/tests/bugs/bug42488.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/soap soap.c /ext/soap/tests/bugs bug42488.phpt
dmitry Wed Sep 5 10:18:38 2007 UTC Modified files: /php-src/ext/soap soap.c /php-src/ext/soap/tests/bugsbug42488.phpt Log: Fixed bug #42488 (SoapServer reports an encoding error and the error itself breaks). http://cvs.php.net/viewvc.cgi/php-src/ext/soap/soap.c?r1=1.228r2=1.229diff_format=u Index: php-src/ext/soap/soap.c diff -u php-src/ext/soap/soap.c:1.228 php-src/ext/soap/soap.c:1.229 --- php-src/ext/soap/soap.c:1.228 Fri Aug 31 10:48:57 2007 +++ php-src/ext/soap/soap.c Wed Sep 5 10:18:37 2007 @@ -17,7 +17,7 @@ | Dmitry Stogov [EMAIL PROTECTED] | +--+ */ -/* $Id: soap.c,v 1.228 2007/08/31 10:48:57 dmitry Exp $ */ +/* $Id: soap.c,v 1.229 2007/09/05 10:18:37 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -343,13 +343,49 @@ if (n = 0) { efree(str); str = estrdup((char*)xmlBufferContent(out)); - } else if (!php_libxml_xmlCheckUTF8(BAD_CAST(str))) { - soap_error1(E_ERROR, Encoding: string '%s' is not a valid utf-8 string, str); } xmlBufferFree(out); xmlBufferFree(in); - } else if (!php_libxml_xmlCheckUTF8(BAD_CAST(str))) { - soap_error1(E_ERROR, Encoding: string '%s' is not a valid utf-8 string, str); + } + if (!php_libxml_xmlCheckUTF8(BAD_CAST(str))) { + char *err = emalloc(new_len + 8); + char c; + int i; + + memcpy(err, str, new_len+1); + for (i = 0; (c = err[i++]);) { + if ((c 0x80) == 0) { + } else if ((c 0xe0) == 0xc0) { + if ((err[i] 0xc0) != 0x80) { + break; + } + i++; + } else if ((c 0xf0) == 0xe0) { + if ((err[i] 0xc0) != 0x80 || (err[i+1] 0xc0) != 0x80) { + break; + } + i += 2; + } else if ((c 0xf8) == 0xf0) { + if ((err[i] 0xc0) != 0x80 || (err[i+1] 0xc0) != 0x80 || (err[i+2] 0xc0) != 0x80) { + break; + } + i += 3; + } else { + break; + } + } + if (c) { + err[i-1] = '\\'; + err[i++] = 'x'; + err[i++] = ((unsigned char)c 4) + unsigned char)c 4) 9) ? ('a' - 10) : '0'); + err[i++] = (c 15) + (((c 15) 9) ? ('a' - 10) : '0'); + err[i++] = '.'; + err[i++] = '.'; + err[i++] = '.'; + err[i++] = 0; + } + + soap_error1(E_ERROR, Encoding: string '%s' is not a valid utf-8 string, err); } } return str; @@ -386,13 +422,49 @@ efree(str); str = estrdup((char*)xmlBufferContent(out)); new_len = n; - } else if (!php_libxml_xmlCheckUTF8(BAD_CAST(str))) { - soap_error1(E_ERROR, Encoding: string '%s' is not a valid utf-8 string, str); } xmlBufferFree(out); xmlBufferFree(in); - } else if (!php_libxml_xmlCheckUTF8(BAD_CAST(str))) { - soap_error1(E_ERROR, Encoding: string '%s' is not a valid utf-8 string, str); + } + if (!php_libxml_xmlCheckUTF8(BAD_CAST(str))) { + char *err = emalloc(new_len + 8); + char c; + int i; + + memcpy(err, str, new_len+1); + for (i = 0; (c = err[i++]);) { + if ((c 0x80) == 0) { + } else if ((c 0xe0) == 0xc0) { + if ((err[i] 0xc0) != 0x80) { + break; + } +
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/soap php_soap.h soap.c /ext/soap/tests/bugs bug42214.phpt
dmitry Wed Sep 5 11:20:46 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/soap/tests/bugsbug42214.phpt Modified files: /php-srcNEWS /php-src/ext/soap php_soap.h soap.c Log: Fixed bug #42214 (SoapServer sends clients internal PHP errors) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.929r2=1.2027.2.547.2.930diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.929 php-src/NEWS:1.2027.2.547.2.930 --- php-src/NEWS:1.2027.2.547.2.929 Wed Sep 5 10:18:22 2007 +++ php-src/NEWSWed Sep 5 11:20:45 2007 @@ -26,6 +26,7 @@ breaks). (Dmitry) - Fixed bug #42359 (xsd:list type not parsed). (Dmitry) - Fixed bug #42326 (SoapServer crash). (Dmitry) +- Fixed bug #42214 (SoapServer sends clients internal PHP errors). (Dmitry) - Fixed bug #42086 (SoapServer return Procedure '' not present for WSIBasic compliant wsdl). (Dmitry) http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_soap.h?r1=1.38.2.6.2.5r2=1.38.2.6.2.6diff_format=u Index: php-src/ext/soap/php_soap.h diff -u php-src/ext/soap/php_soap.h:1.38.2.6.2.5 php-src/ext/soap/php_soap.h:1.38.2.6.2.6 --- php-src/ext/soap/php_soap.h:1.38.2.6.2.5Mon Apr 2 13:43:08 2007 +++ php-src/ext/soap/php_soap.h Wed Sep 5 11:20:45 2007 @@ -17,7 +17,7 @@ | Dmitry Stogov [EMAIL PROTECTED] | +--+ */ -/* $Id: php_soap.h,v 1.38.2.6.2.5 2007/04/02 13:43:08 dmitry Exp $ */ +/* $Id: php_soap.h,v 1.38.2.6.2.6 2007/09/05 11:20:45 dmitry Exp $ */ #ifndef PHP_SOAP_H #define PHP_SOAP_H @@ -106,6 +106,7 @@ HashTable *class_map; intfeatures; struct _soapHeader **soap_headers_ptr; + int send_errors; }; #define SOAP_CLASS 1 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/soap.c?r1=1.156.2.28.2.29r2=1.156.2.28.2.30diff_format=u Index: php-src/ext/soap/soap.c diff -u php-src/ext/soap/soap.c:1.156.2.28.2.29 php-src/ext/soap/soap.c:1.156.2.28.2.30 --- php-src/ext/soap/soap.c:1.156.2.28.2.29 Fri Aug 31 10:48:45 2007 +++ php-src/ext/soap/soap.c Wed Sep 5 11:20:45 2007 @@ -17,7 +17,7 @@ | Dmitry Stogov [EMAIL PROTECTED] | +--+ */ -/* $Id: soap.c,v 1.156.2.28.2.29 2007/08/31 10:48:45 dmitry Exp $ */ +/* $Id: soap.c,v 1.156.2.28.2.30 2007/09/05 11:20:45 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -1035,6 +1035,7 @@ service = emalloc(sizeof(soapService)); memset(service, 0, sizeof(soapService)); + service-send_errors = 1; cache_wsdl = SOAP_GLOBAL(cache); @@ -1099,6 +1100,11 @@ cache_wsdl = Z_LVAL_PP(tmp); } + if (zend_hash_find(ht, send_errors, sizeof(send_errors), (void**)tmp) == SUCCESS + (Z_TYPE_PP(tmp) == IS_BOOL || Z_TYPE_PP(tmp) == IS_LONG)) { + service-send_errors = Z_LVAL_PP(tmp); + } + } else if (wsdl == NULL) { php_error_docref(NULL TSRMLS_CC, E_ERROR, Invalid arguments. 'uri' option is required in nonWSDL mode.); } @@ -2129,34 +2135,46 @@ char* code = SOAP_GLOBAL(error_code); char buffer[1024]; - int buffer_len; zval *outbuf = NULL; - zval outbuflen; + zval **tmp; + soapServicePtr service; - INIT_ZVAL(outbuflen); + if (code == NULL) { + code = Server; + } + if (SOAP_GLOBAL(error_object) + Z_TYPE_P(SOAP_GLOBAL(error_object)) == IS_OBJECT + instanceof_function(Z_OBJCE_P(SOAP_GLOBAL(error_object)), soap_server_class_entry TSRMLS_CC) + zend_hash_find(Z_OBJPROP_P(SOAP_GLOBAL(error_object)), service, sizeof(service), (void **)tmp) != FAILURE + (service = (soapServicePtr)zend_fetch_resource(tmp TSRMLS_CC, -1, service, NULL, 1, le_service)) + !service-send_errors) { + strcpy(buffer, Internal Error); + } else { + int buffer_len; + zval outbuflen; + + INIT_ZVAL(outbuflen); #ifdef va_copy - va_copy(argcopy, args); - buffer_len = vslprintf(buffer, sizeof(buffer)-1, format, argcopy); - va_end(argcopy); + va_copy(argcopy, args); + buffer_len = vslprintf(buffer, sizeof(buffer)-1, format, argcopy); +
[PHP-CVS] cvs: php-src /ext/soap php_soap.h soap.c /ext/soap/tests/bugs bug42214.phpt
dmitry Wed Sep 5 11:21:01 2007 UTC Modified files: /php-src/ext/soap php_soap.h soap.c /php-src/ext/soap/tests/bugsbug42214.phpt Log: Fixed bug #42214 (SoapServer sends clients internal PHP errors) http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_soap.h?r1=1.52r2=1.53diff_format=u Index: php-src/ext/soap/php_soap.h diff -u php-src/ext/soap/php_soap.h:1.52 php-src/ext/soap/php_soap.h:1.53 --- php-src/ext/soap/php_soap.h:1.52Mon Apr 2 13:43:29 2007 +++ php-src/ext/soap/php_soap.h Wed Sep 5 11:21:01 2007 @@ -17,7 +17,7 @@ | Dmitry Stogov [EMAIL PROTECTED] | +--+ */ -/* $Id: php_soap.h,v 1.52 2007/04/02 13:43:29 dmitry Exp $ */ +/* $Id: php_soap.h,v 1.53 2007/09/05 11:21:01 dmitry Exp $ */ #ifndef PHP_SOAP_H #define PHP_SOAP_H @@ -105,6 +105,7 @@ inttype; char *actor; struct _soapHeader **soap_headers_ptr; + int send_errors; } soap_server_object; typedef struct _soap_client_object { http://cvs.php.net/viewvc.cgi/php-src/ext/soap/soap.c?r1=1.229r2=1.230diff_format=u Index: php-src/ext/soap/soap.c diff -u php-src/ext/soap/soap.c:1.229 php-src/ext/soap/soap.c:1.230 --- php-src/ext/soap/soap.c:1.229 Wed Sep 5 10:18:37 2007 +++ php-src/ext/soap/soap.c Wed Sep 5 11:21:01 2007 @@ -17,7 +17,7 @@ | Dmitry Stogov [EMAIL PROTECTED] | +--+ */ -/* $Id: soap.c,v 1.229 2007/09/05 10:18:37 dmitry Exp $ */ +/* $Id: soap.c,v 1.230 2007/09/05 11:21:01 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -1382,6 +1382,7 @@ } service = (soap_server_object*)zend_object_store_get_object(this_ptr TSRMLS_CC); + service-send_errors = 1; cache_wsdl = SOAP_GLOBAL(cache); @@ -1457,6 +1458,11 @@ Z_TYPE_PP(tmp) == IS_LONG) { cache_wsdl = Z_LVAL_PP(tmp); } + + if (zend_ascii_hash_find(ht, send_errors, sizeof(send_errors), (void**)tmp) == SUCCESS + (Z_TYPE_PP(tmp) == IS_BOOL || Z_TYPE_PP(tmp) == IS_LONG)) { + service-send_errors = Z_LVAL_PP(tmp); + } } if (wsdl == NULL service-uri == NULL) { @@ -2504,30 +2510,41 @@ error_num == E_PARSE) { char* code = SOAP_GLOBAL(error_code); + soap_server_object *server; char *buffer; - int buffer_len; zval *outbuf = NULL; - zval outbuflen; - INIT_ZVAL(outbuflen); + if (code == NULL) { + code = Server; + } + + if (SOAP_GLOBAL(error_object) + Z_TYPE_P(SOAP_GLOBAL(error_object)) == IS_OBJECT + instanceof_function(Z_OBJCE_P(SOAP_GLOBAL(error_object)), soap_server_class_entry TSRMLS_CC) + (server = (soap_server_object*)zend_object_store_get_object(SOAP_GLOBAL(error_object) TSRMLS_CC)) + !server-send_errors) { + buffer = estrdup(Internal Error); + } else { + int buffer_len; + zval outbuflen; + + INIT_ZVAL(outbuflen); #ifdef va_copy - va_copy(argcopy, args); - buffer_len = vspprintf(buffer, 0, format, argcopy); - va_end(argcopy); + va_copy(argcopy, args); + buffer_len = vspprintf(buffer, 0, format, argcopy); + va_end(argcopy); #else - buffer_len = vspprintf(buffer, 0, format, args); + buffer_len = vspprintf(buffer, 0, format, args); #endif - if (code == NULL) { - code = Server; - } - /* Get output buffer and send as fault detials */ - if (php_output_get_length(outbuflen TSRMLS_CC) != FAILURE Z_LVAL(outbuflen) != 0) { - ALLOC_INIT_ZVAL(outbuf); - php_output_get_contents(outbuf TSRMLS_CC); + /* Get output buffer and send as fault detials */ + if (php_output_get_length(outbuflen TSRMLS_CC) != FAILURE Z_LVAL(outbuflen) != 0) { + ALLOC_INIT_ZVAL(outbuf); + php_output_get_contents(outbuf TSRMLS_CC); +
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/mysqli mysqli_api.c /ext/mysqli/tests bug38710.phpt
andrey Wed Sep 5 12:36:44 2007 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/ext/mysqli mysqli_api.c /php-src/ext/mysqli/tests bug38710.phpt Log: Fixed bug #42378 (mysqli_stmt_bind_result memory exhaustion) Fixed regression of bug 38710. Already fixed in HEAD. #HEAD will be fixed when doing the next merge from svn http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.930r2=1.2027.2.547.2.931diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.930 php-src/NEWS:1.2027.2.547.2.931 --- php-src/NEWS:1.2027.2.547.2.930 Wed Sep 5 11:20:45 2007 +++ php-src/NEWSWed Sep 5 12:36:44 2007 @@ -24,6 +24,7 @@ compression stream). (Ilia) - Fixed bug #42488 (SoapServer reports an encoding error and the error itself breaks). (Dmitry) +- Fixed bug #42378 (mysqli_stmt_bind_result memory exhaustion). (Andrey) - Fixed bug #42359 (xsd:list type not parsed). (Dmitry) - Fixed bug #42326 (SoapServer crash). (Dmitry) - Fixed bug #42214 (SoapServer sends clients internal PHP errors). (Dmitry) http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_api.c?r1=1.118.2.22.2.14r2=1.118.2.22.2.15diff_format=u Index: php-src/ext/mysqli/mysqli_api.c diff -u php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.14 php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.15 --- php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.14 Tue Jul 24 09:22:16 2007 +++ php-src/ext/mysqli/mysqli_api.c Wed Sep 5 12:36:44 2007 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli_api.c,v 1.118.2.22.2.14 2007/07/24 09:22:16 andrey Exp $ + $Id: mysqli_api.c,v 1.118.2.22.2.15 2007/09/05 12:36:44 andrey Exp $ */ #ifdef HAVE_CONFIG_H @@ -325,6 +325,9 @@ case MYSQL_TYPE_VAR_STRING: case MYSQL_TYPE_STRING: case MYSQL_TYPE_BLOB: + case MYSQL_TYPE_TINY_BLOB: + case MYSQL_TYPE_MEDIUM_BLOB: + case MYSQL_TYPE_LONG_BLOB: case MYSQL_TYPE_TIMESTAMP: case MYSQL_TYPE_DECIMAL: #ifdef FIELD_TYPE_NEWDECIMAL @@ -2000,7 +2003,10 @@ double - but this is a known problem of the simple MySQL API ;) */ for (i = mysql_stmt_field_count(stmt-stmt) - 1; i =0; --i) { - if (stmt-stmt-fields stmt-stmt-fields[i].type == MYSQL_TYPE_BLOB) { + if (stmt-stmt-fields (stmt-stmt-fields[i].type == MYSQL_TYPE_BLOB || + stmt-stmt-fields[i].type == MYSQL_TYPE_MEDIUM_BLOB || + stmt-stmt-fields[i].type == MYSQL_TYPE_LONG_BLOB)) + { my_bool tmp=1; mysql_stmt_attr_set(stmt-stmt, STMT_ATTR_UPDATE_MAX_LENGTH, tmp); break; http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug38710.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/mysqli/tests/bug38710.phpt diff -u php-src/ext/mysqli/tests/bug38710.phpt:1.1.2.2 php-src/ext/mysqli/tests/bug38710.phpt:1.1.2.3 --- php-src/ext/mysqli/tests/bug38710.phpt:1.1.2.2 Sun Mar 25 01:14:51 2007 +++ php-src/ext/mysqli/tests/bug38710.phpt Wed Sep 5 12:36:44 2007 @@ -12,7 +12,8 @@ $qry-execute(); $qry-bind_result($text); $qry-fetch(); -var_dump($text); +var_dump(strlen($text), md5($text)); ? --EXPECTF-- -string(8193) aa!
[PHP-CVS] cvs: php-src /ext/standard dir.c file.c
iliaa Wed Sep 5 12:55:37 2007 UTC Modified files: /php-src/ext/standard dir.c file.c Log: MFB: Fixed possible buffer overflows inside the fnmatch() and glob() functions http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dir.c?r1=1.168r2=1.169diff_format=u Index: php-src/ext/standard/dir.c diff -u php-src/ext/standard/dir.c:1.168 php-src/ext/standard/dir.c:1.169 --- php-src/ext/standard/dir.c:1.168Wed Aug 22 14:58:30 2007 +++ php-src/ext/standard/dir.c Wed Sep 5 12:55:36 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: dir.c,v 1.168 2007/08/22 14:58:30 jani Exp $ */ +/* $Id: dir.c,v 1.169 2007/09/05 12:55:36 iliaa Exp $ */ /* {{{ includes/startup/misc */ @@ -427,6 +427,11 @@ return; } + if (pattern_len = MAXPATHLEN) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Pattern exceeds the maximum allowed length of %d characters, MAXPATHLEN); + RETURN_FALSE; + } + if ((GLOB_AVAILABLE_FLAGS flags) != flags) { php_error_docref(NULL TSRMLS_CC, E_WARNING, At least one of the passed flags is invalid or not supported on this platform); RETURN_FALSE; http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.499r2=1.500diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.499 php-src/ext/standard/file.c:1.500 --- php-src/ext/standard/file.c:1.499 Mon Sep 3 11:53:43 2007 +++ php-src/ext/standard/file.c Wed Sep 5 12:55:36 2007 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.499 2007/09/03 11:53:43 jani Exp $ */ +/* $Id: file.c,v 1.500 2007/09/05 12:55:36 iliaa Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -2894,6 +2894,11 @@ zend_unicode_to_string_ex(UG(utf8_conv), filename_utf8, filename_utf8_len, filename.u, filename_len, status); pattern.s = pattern_utf8; filename.s = filename_utf8; + filename_len = filename_utf8_len; + } + if (filename_len = MAXPATHLEN) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Filename exceeds the maximum allowed length of %d characters, MAXPATHLEN); + RETURN_FALSE; } RETVAL_BOOL( ! fnmatch( pattern.s, filename.s, flags )); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pgsql pgsql.c
iliaa Wed Sep 5 12:56:16 2007 UTC Modified files: /php-src/ext/pgsql pgsql.c Log: MFB: Fixed bug #42506 (php_pgsql_convert() timezone parse bug) http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/pgsql.c?r1=1.369r2=1.370diff_format=u Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.369 php-src/ext/pgsql/pgsql.c:1.370 --- php-src/ext/pgsql/pgsql.c:1.369 Tue Aug 21 23:51:34 2007 +++ php-src/ext/pgsql/pgsql.c Wed Sep 5 12:56:16 2007 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.369 2007/08/21 23:51:34 iliaa Exp $ */ +/* $Id: pgsql.c,v 1.370 2007/09/05 12:56:16 iliaa Exp $ */ #include stdlib.h @@ -4975,7 +4975,7 @@ ZVAL_STRINGL(new_val, NOW(), sizeof(NOW())-1, 1); } else { /* FIXME: better regex must be used */ - if (php_pgsql_convert_match(Z_STRVAL_PP(val), ^([0-9]{4}[/-][0-9]{1,2}[/-][0-9]{1,2})([ \\t]+(([0-9]{1,2}:[0-9]{1,2}){1}(:[0-9]{1,2}){0,1}(\\.[0-9]+){0,1}([ \\t]*([+-][0-9]{1,2}(:[0-9]{1,2}){0,1}|[a-zA-Z]{1,5})){0,1})){0,1}$, 1 TSRMLS_CC) == FAILURE) { + if (php_pgsql_convert_match(Z_STRVAL_PP(val), ^([0-9]{4}[/-][0-9]{1,2}[/-][0-9]{1,2})([ \\t]+(([0-9]{1,2}:[0-9]{1,2}){1}(:[0-9]{1,2}){0,1}(\\.[0-9]+){0,1}([ \\t]*([+-][0-9]{1,2}(:[0-9]{1,2}){0,1}|[-a-zA-Z_/+]{1,50})){0,1})){0,1}$, 1 TSRMLS_CC) == FAILURE) { err = 1; } else { ZVAL_STRING(new_val, Z_STRVAL_PP(val), 1); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pgsql pgsql.c
iliaa Wed Sep 5 12:58:48 2007 UTC Modified files: /php-src/ext/pgsql pgsql.c Log: MFB: Fixed bug #41845 (pgsql extension does not compile with PostgreSQL 7.4) http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/pgsql.c?r1=1.370r2=1.371diff_format=u Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.370 php-src/ext/pgsql/pgsql.c:1.371 --- php-src/ext/pgsql/pgsql.c:1.370 Wed Sep 5 12:56:16 2007 +++ php-src/ext/pgsql/pgsql.c Wed Sep 5 12:58:48 2007 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.370 2007/09/05 12:56:16 iliaa Exp $ */ +/* $Id: pgsql.c,v 1.371 2007/09/05 12:58:48 iliaa Exp $ */ #include stdlib.h @@ -82,6 +82,10 @@ #define CHECK_DEFAULT_LINK(x) if ((x) == -1) { php_error_docref(NULL TSRMLS_CC, E_WARNING, No PostgreSQL link opened yet); } +#ifndef HAVE_PQFREEMEM +#define PGfreemem free +#endif + ZEND_DECLARE_MODULE_GLOBALS(pgsql) static PHP_GINIT_FUNCTION(pgsql); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pgsql pgsql.c
iliaa Wed Sep 5 13:03:33 2007 UTC Modified files: /php-src/ext/pgsql pgsql.c Log: Fixed typo in function name http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/pgsql.c?r1=1.371r2=1.372diff_format=u Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.371 php-src/ext/pgsql/pgsql.c:1.372 --- php-src/ext/pgsql/pgsql.c:1.371 Wed Sep 5 12:58:48 2007 +++ php-src/ext/pgsql/pgsql.c Wed Sep 5 13:03:33 2007 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.371 2007/09/05 12:58:48 iliaa Exp $ */ +/* $Id: pgsql.c,v 1.372 2007/09/05 13:03:33 iliaa Exp $ */ #include stdlib.h @@ -83,7 +83,7 @@ #define CHECK_DEFAULT_LINK(x) if ((x) == -1) { php_error_docref(NULL TSRMLS_CC, E_WARNING, No PostgreSQL link opened yet); } #ifndef HAVE_PQFREEMEM -#define PGfreemem free +#define PQfreemem free #endif ZEND_DECLARE_MODULE_GLOBALS(pgsql) -- 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/pgsql pgsql.c
iliaa Wed Sep 5 13:03:59 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/pgsql pgsql.c Log: MFH: fixed typo in function name http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/pgsql.c?r1=1.331.2.13.2.23r2=1.331.2.13.2.24diff_format=u Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.331.2.13.2.23 php-src/ext/pgsql/pgsql.c:1.331.2.13.2.24 --- php-src/ext/pgsql/pgsql.c:1.331.2.13.2.23 Mon Sep 3 15:36:04 2007 +++ php-src/ext/pgsql/pgsql.c Wed Sep 5 13:03:59 2007 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.331.2.13.2.23 2007/09/03 15:36:04 iliaa Exp $ */ +/* $Id: pgsql.c,v 1.331.2.13.2.24 2007/09/05 13:03:59 iliaa Exp $ */ #include stdlib.h @@ -82,7 +82,7 @@ #define CHECK_DEFAULT_LINK(x) if ((x) == -1) { php_error_docref(NULL TSRMLS_CC, E_WARNING, No PostgreSQL link opened yet); } #ifndef HAVE_PQFREEMEM -#define PGfreemem free +#define PQfreemem free #endif ZEND_DECLARE_MODULE_GLOBALS(pgsql) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard dir.c file.c
Calm down, Jani. I'm sure it was just an oversight. -Andrei http://10fathoms.org/vu - daily photoblog On Sep 5, 2007, at 2:06 AM, Jani Taskinen wrote: This is against the proper procedure. You're supposed to commit first to HEAD then MFH to the appropriate branch. We don't have the luxury of having some divas around here who think they can do whatever they like.. Can someone please revoke Ilia's CVS account? Only committing to a branch and leaving the trunk unpatched is sabotage IMO.. --Jani -- 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) / NEWS /ext/mysqli mysqli_api.c /ext/mysqli/tests bug38710.phpt
The test fails in 5_2 branch (didn't check HEAD yet). # cat ext/mysqli/tests/bug38710.diff 001+ int(8193) 002+ string(32) b7652d9bca37038c342cc0c492dd70f9 001- int(10) 002- string(32) 1af6d6f2f682f76f80e606aeaaee1680 On 05.09.2007 16:36, Andrey Hristov wrote: andreyWed Sep 5 12:36:44 2007 UTC Modified files: (Branch: PHP_5_2) /php-src NEWS /php-src/ext/mysqli mysqli_api.c /php-src/ext/mysqli/tests bug38710.phpt Log: Fixed bug #42378 (mysqli_stmt_bind_result memory exhaustion) Fixed regression of bug 38710. Already fixed in HEAD. #HEAD will be fixed when doing the next merge from svn -- Wbr, Antony Dovgal -- 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) / NEWS /ext/mysqli mysqli_api.c /ext/mysqli/tests bug38710.phpt
The machine is Linux x86-64. On 06.09.2007 02:43, Antony Dovgal wrote: The test fails in 5_2 branch (didn't check HEAD yet). # cat ext/mysqli/tests/bug38710.diff 001+ int(8193) 002+ string(32) b7652d9bca37038c342cc0c492dd70f9 001- int(10) 002- string(32) 1af6d6f2f682f76f80e606aeaaee1680 -- Wbr, Antony Dovgal -- 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/tests/strings addslashes_basic.phpt addslashes_error.phpt addslashes_variation1.phpt addslashes_variation2.phpt addslashes_variation3.phpt
kraghubaThu Sep 6 04:01:25 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/strings addslashes_error.phpt addslashes_basic.phpt addslashes_variation1.phpt addslashes_variation2.phpt addslashes_variation3.phpt Log: New testcases for addslashes() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/addslashes_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/addslashes_error.phpt +++ php-src/ext/standard/tests/strings/addslashes_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/addslashes_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/addslashes_basic.phpt +++ php-src/ext/standard/tests/strings/addslashes_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/addslashes_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/addslashes_variation1.phpt +++ php-src/ext/standard/tests/strings/addslashes_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/addslashes_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/addslashes_variation2.phpt +++ php-src/ext/standard/tests/strings/addslashes_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/addslashes_variation3.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/addslashes_variation3.phpt +++ php-src/ext/standard/tests/strings/addslashes_variation3.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/strings addslashes_basic.phpt addslashes_error.phpt addslashes_variation1.phpt addslashes_variation2.phpt
kraghubaThu Sep 6 04:02:56 2007 UTC Modified files: /php-src/ext/standard/tests/strings addslashes_error.phpt addslashes_variation1.phpt addslashes_basic.phpt addslashes_variation2.phpt Log: New testcases for addslashes() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/addslashes_error.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/strings/addslashes_error.phpt diff -u /dev/null php-src/ext/standard/tests/strings/addslashes_error.phpt:1.2 --- /dev/null Thu Sep 6 04:02:56 2007 +++ php-src/ext/standard/tests/strings/addslashes_error.phptThu Sep 6 04:02:56 2007 @@ -0,0 +1,59 @@ +--TEST-- +Test addslashes() function : error conditions +--INI-- +--FILE-- +?php +/* Prototype : string addslashes ( string $str ) + * Description: Returns a string with backslashes before characters that need to be quoted in database queries etc. + * Source code: ext/standard/string.c +*/ + +/* + * Testing addslashes() for error conditions +*/ + +echo *** Testing addslashes() : error conditions ***\n; + +// Zero argument +echo \n-- Testing addslashes() function with Zero arguments --\n; +var_dump( addslashes() ); + +// More than expected number of arguments +echo \n-- Testing addslashes() function with more than expected no. of arguments --\n; +$str = 'hello\world'; +$extra_arg = 10; + +var_dump( addslashes($str, $extra_arg) ); +var_dump( $str ); + +echo Done\n; +? +--EXPECTF-- +*** Testing addslashes() : error conditions *** + +-- Testing addslashes() function with Zero arguments -- + +Warning: Wrong parameter count for addslashes() in %s on line %d +NULL + +-- Testing addslashes() function with more than expected no. of arguments -- + +Warning: Wrong parameter count for addslashes() in %s on line %d +NULL +string(15) hello\world +Done + +--UEXPECTF-- +*** Testing addslashes() : error conditions *** + +-- Testing addslashes() function with Zero arguments -- + +Warning: Wrong parameter count for addslashes() in %s on line %d +NULL + +-- Testing addslashes() function with more than expected no. of arguments -- + +Warning: Wrong parameter count for addslashes() in %s on line %d +NULL +unicode(15) hello\world +Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/addslashes_variation1.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/strings/addslashes_variation1.phpt diff -u /dev/null php-src/ext/standard/tests/strings/addslashes_variation1.phpt:1.2 --- /dev/null Thu Sep 6 04:02:56 2007 +++ php-src/ext/standard/tests/strings/addslashes_variation1.phpt Thu Sep 6 04:02:56 2007 @@ -0,0 +1,242 @@ +--TEST-- +Test addslashes() function : usage variations - non-string type argument +--INI-- +--FILE-- +?php +/* Prototype : string addslashes ( string $str ) + * Description: Returns a string with backslashes before characters that need to be quoted in database queries etc. + * Source code: ext/standard/string.c +*/ + +/* + * Test addslashes() with non-string type argument such as int, float, etc +*/ + +echo *** Testing addslashes() : with non-string type argument ***\n; +// initialize all required variables + +// get an unset variable +$unset_var = 'string_val'; +unset($unset_var); + +// declaring a class +class sample { + public function __toString() { + return obj'ct; + } +} + +// Defining resource +$file_handle = fopen(__FILE__, 'r'); + +// array with different values +$values = array ( + + // integer values + 0, + 1, + 12345, + -2345, + + // float values + 10.5, + -10.5, + 10.5e10, + 10.6E-10, + .5, + + // array values + array(), + array(0), + array(1), + array(1, 2), + array('color' = 'red', 'item' = 'pen'), + + // boolean values + true, + false, + TRUE, + FALSE, + + // empty string + , + '', + + // undefined variable + $undefined_var, + + // unset variable + $unset_var, + + // objects + new sample(), + + // resource + $file_handle, + + NULL, + null +); + + +// loop through each element of the array and check the working of addslashes() +// when $str arugment is supplied with different values +echo \n--- Testing addslashes() by supplying different values for 'str' argument ---\n; +$counter = 1; +for($index = 0; $index count($values); $index ++) { + echo -- Iteration $counter --\n; + $str = $values [$index]; + + var_dump( addslashes($str) ); + + $counter ++; +} + +// closing the file +fclose($file_handle); + +echo Done\n; +? +--EXPECTF-- +*** Testing addslashes() : with non-string type argument *** + +Notice: Undefined variable: undefined_var in %s on line %d + +Notice: Undefined variable: unset_var in %s on line %d + +--- Testing addslashes() by supplying different values for 'str' argument --- +-- Iteration 1 -- +string(1) 0 +-- Iteration 2 -- +string(1) 1 +-- Iteration 3 -- +string(5) 12345 +-- Iteration 4 -- +string(5)