[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/openssl/openssl.c trunk/ext/openssl/openssl.c
pajoye Thu, 02 Dec 2010 11:37:43 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305902 Log: - not TS and useless on server, also not required anymore with the supported windows versions Changed paths: U php/php-src/branches/PHP_5_3/ext/openssl/openssl.c U php/php-src/trunk/ext/openssl/openssl.c Modified: php/php-src/branches/PHP_5_3/ext/openssl/openssl.c === --- php/php-src/branches/PHP_5_3/ext/openssl/openssl.c 2010-12-02 10:23:19 UTC (rev 305901) +++ php/php-src/branches/PHP_5_3/ext/openssl/openssl.c 2010-12-02 11:37:43 UTC (rev 305902) @@ -868,10 +868,7 @@ *egdsocket = 0; *seeded = 0; - -#ifdef WINDOWS - RAND_screen(); -#endif + if (file == NULL) { file = RAND_file_name(buffer, sizeof(buffer)); } else if (RAND_egd(file) 0) { Modified: php/php-src/trunk/ext/openssl/openssl.c === --- php/php-src/trunk/ext/openssl/openssl.c 2010-12-02 10:23:19 UTC (rev 305901) +++ php/php-src/trunk/ext/openssl/openssl.c 2010-12-02 11:37:43 UTC (rev 305902) @@ -886,10 +886,7 @@ *egdsocket = 0; *seeded = 0; - -#ifdef WINDOWS - RAND_screen(); -#endif + if (file == NULL) { file = RAND_file_name(buffer, sizeof(buffer)); } else if (RAND_egd(file) 0) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS
pajoye Thu, 02 Dec 2010 22:56:57 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305920 Log: - some missing entries Changed paths: U php/php-src/branches/PHP_5_3/NEWS Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-12-02 21:02:20 UTC (rev 305919) +++ php/php-src/branches/PHP_5_3/NEWS 2010-12-02 22:56:57 UTC (rev 305920) @@ -17,6 +17,7 @@ . Fixed #53409 (sleep() returns NULL on Windows). (Pierre) - Curl extension: + . Fixed bug #50410 (curl extension slows down PHP on Windows). (Pierre) . Fixed bug #52828 (curl_setopt does not accept persistent streams). (Gustavo, Ilia) . Fixed bug #52202 (CURLOPT_PRIVATE gets corrupted). (Ilia) @@ -261,6 +262,8 @@ (mkoegler at auto dot tuwien dot ac dot at) - Openssl extension: + . Fixed possible blocking behavior in openssl_random_pseudo_bytes on Windows. +(Pierre) . Fixed bug #53136 (Invalid read on openssl_csr_new()). (Felipe) . Fixed bug #52947 (segfault when ssl stream option capture_peer_cert_chain used). (Felipe) @@ -302,6 +305,7 @@ (Felipe) - PDO Firebird driver: + . Restore firebird support (VC9 builds only). (Pierre) . Fixed bug #53335 (pdo_firebird did not implement rowCount()). (preeves at ibphoenix dot com) . Fixed bug #53323 (pdo_firebird getAttribute() crash). -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/win32/build/config.w32 trunk/win32/build/config.w32
pajoye Thu, 02 Dec 2010 23:23:14 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305923 Log: - Fix #29085, bad default include_path on Windows Bug: http://bugs.php.net/29085 (Closed) bad default include_path on Windows Changed paths: U php/php-src/branches/PHP_5_3/win32/build/config.w32 U php/php-src/trunk/win32/build/config.w32 Modified: php/php-src/branches/PHP_5_3/win32/build/config.w32 === --- php/php-src/branches/PHP_5_3/win32/build/config.w32 2010-12-02 23:12:07 UTC (rev 305922) +++ php/php-src/branches/PHP_5_3/win32/build/config.w32 2010-12-02 23:23:14 UTC (rev 305923) @@ -104,7 +104,7 @@ // Configures the hard-coded installation dir ARG_ENABLE('prefix', 'where PHP will be installed', ''); if (PHP_PREFIX == '') { - PHP_PREFIX = C:\\php + PHP_VERSION; + PHP_PREFIX = C:\\php; if (PHP_DEBUG == yes) PHP_PREFIX += \\debug; } Modified: php/php-src/trunk/win32/build/config.w32 === --- php/php-src/trunk/win32/build/config.w322010-12-02 23:12:07 UTC (rev 305922) +++ php/php-src/trunk/win32/build/config.w322010-12-02 23:23:14 UTC (rev 305923) @@ -109,7 +109,7 @@ // Configures the hard-coded installation dir ARG_ENABLE('prefix', 'where PHP will be installed', ''); if (PHP_PREFIX == '') { - PHP_PREFIX = C:\\php + PHP_VERSION; + PHP_PREFIX = C:\\php; if (PHP_DEBUG == yes) PHP_PREFIX += \\debug; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/Zend/ zend_compile.c
pajoye Wed, 01 Dec 2010 16:48:53 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305892 Log: - fix ts build Changed paths: U php/php-src/trunk/Zend/zend_compile.c Modified: php/php-src/trunk/Zend/zend_compile.c === --- php/php-src/trunk/Zend/zend_compile.c 2010-12-01 15:58:17 UTC (rev 305891) +++ php/php-src/trunk/Zend/zend_compile.c 2010-12-01 16:48:53 UTC (rev 305892) @@ -5545,7 +5545,7 @@ fetch_simple_variable(result, variable, 1 TSRMLS_CC); /* there is a chance someone is accessing $this */ if (CG(active_op_array)-scope CG(active_op_array)-this_var == -1) { - CG(active_op_array)-this_var = lookup_cv(CG(active_op_array), estrndup(this, sizeof(this)-1), sizeof(this)-1); + CG(active_op_array)-this_var = lookup_cv(CG(active_op_array), estrndup(this, sizeof(this)-1), sizeof(this)-1 TSRMLS_CC); } } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/zip/php_zip.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/zip/php_zip.c trunk/ext/zip/php_zip.c
pajoye Tue, 30 Nov 2010 11:04:06 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305848 Log: Fixed crash in zip extract method (possible CWE-170) Changed paths: U php/php-src/branches/PHP_5_2/NEWS U php/php-src/branches/PHP_5_2/ext/zip/php_zip.c U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/zip/php_zip.c U php/php-src/trunk/ext/zip/php_zip.c Modified: php/php-src/branches/PHP_5_2/NEWS === --- php/php-src/branches/PHP_5_2/NEWS 2010-11-30 10:20:33 UTC (rev 305847) +++ php/php-src/branches/PHP_5_2/NEWS 2010-11-30 11:04:06 UTC (rev 305848) @@ -5,6 +5,8 @@ EXTR_OVERWRITE. (jorto at redhat dot com) 18 Nov 2010, PHP 5.2.15RC1 +- Fixed crash in zip extract method (possible CWE-170). + (Maksymilian Arciemowicz, Pierre) - Fixed a possible double free in imap extension (Identified by Mateusz Kocielski). (CVE-2010-4150). (Ilia) - Fixed possible flaw in open_basedir (CVE-2010-3436). (Pierre) Modified: php/php-src/branches/PHP_5_2/ext/zip/php_zip.c === --- php/php-src/branches/PHP_5_2/ext/zip/php_zip.c 2010-11-30 10:20:33 UTC (rev 305847) +++ php/php-src/branches/PHP_5_2/ext/zip/php_zip.c 2010-11-30 11:04:06 UTC (rev 305848) @@ -413,6 +413,9 @@ return 0; } path_cleaned = php_zip_make_relative_path(new_state.cwd, new_state.cwd_length); + if(!path_cleaned) { + return 0; + } path_cleaned_len = strlen(path_cleaned); if (path_cleaned_len = MAXPATHLEN || zip_stat(za, file, 0, sb) != 0) { Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-11-30 10:20:33 UTC (rev 305847) +++ php/php-src/branches/PHP_5_3/NEWS 2010-11-30 11:04:06 UTC (rev 305848) @@ -49,6 +49,8 @@ - Upgraded bundled PCRE to version 8.10. (Ilia) - Security enhancements: + . Fixed crash in zip extract method (possible CWE-170). +(Maksymilian Arciemowicz, Pierre) . Paths with NULL in them (foo\0bar.txt) are now considered as invalid. (Rasmus) . Fixed a possible double free in imap extension (Identified by Mateusz Kocielski). (CVE-2010-4150). (Ilia) Modified: php/php-src/branches/PHP_5_3/ext/zip/php_zip.c === --- php/php-src/branches/PHP_5_3/ext/zip/php_zip.c 2010-11-30 10:20:33 UTC (rev 305847) +++ php/php-src/branches/PHP_5_3/ext/zip/php_zip.c 2010-11-30 11:04:06 UTC (rev 305848) @@ -162,6 +162,9 @@ */ virtual_file_ex(new_state, file, NULL, CWD_EXPAND); path_cleaned = php_zip_make_relative_path(new_state.cwd, new_state.cwd_length); + if(!path_cleaned) { + return 0; + } path_cleaned_len = strlen(path_cleaned); if (path_cleaned_len = MAXPATHLEN || zip_stat(za, file, 0, sb) != 0) { Modified: php/php-src/trunk/ext/zip/php_zip.c === --- php/php-src/trunk/ext/zip/php_zip.c 2010-11-30 10:20:33 UTC (rev 305847) +++ php/php-src/trunk/ext/zip/php_zip.c 2010-11-30 11:04:06 UTC (rev 305848) @@ -162,6 +162,9 @@ */ virtual_file_ex(new_state, file, NULL, CWD_EXPAND TSRMLS_CC); path_cleaned = php_zip_make_relative_path(new_state.cwd, new_state.cwd_length); + if(!path_cleaned) { + return 0; + } path_cleaned_len = strlen(path_cleaned); if (path_cleaned_len = MAXPATHLEN || zip_stat(za, file, 0, sb) != 0) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/main/win95nt.h branches/PHP_5_3/win32/build/config.w32.h.in branches/PHP_5_3/win32/winutil.c trunk/main/win95nt.h trunk/win32/build/
pajoye Fri, 26 Nov 2010 18:25:13 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305778 Log: - Fixed #53409, sleep() return NULL on Windows Bug: http://bugs.php.net/53409 (error getting bug information) Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/main/win95nt.h U php/php-src/branches/PHP_5_3/win32/build/config.w32.h.in U php/php-src/branches/PHP_5_3/win32/winutil.c U php/php-src/trunk/main/win95nt.h U php/php-src/trunk/win32/build/config.w32.h.in Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-11-26 15:29:58 UTC (rev 305777) +++ php/php-src/branches/PHP_5_3/NEWS 2010-11-26 18:25:13 UTC (rev 305778) @@ -13,7 +13,8 @@ decimal places). (Ilia) . Fixed bug #46587 (mt_rand() does not check that max is greater than min). (Ilia) - + . Fixed #53409 (sleep() returns NULL on Windows). (Pierre) + - Hash extension: . Fixed bug #51003 (unaligned memory access in ext/hash/hash_tiger.c). (Mike, Ilia) Modified: php/php-src/branches/PHP_5_3/main/win95nt.h === --- php/php-src/branches/PHP_5_3/main/win95nt.h 2010-11-26 15:29:58 UTC (rev 305777) +++ php/php-src/branches/PHP_5_3/main/win95nt.h 2010-11-26 18:25:13 UTC (rev 305778) @@ -47,7 +47,7 @@ #define mkdir(a, b)_mkdir(a) #define rmdir(a) _rmdir(a) #define getpid _getpid -#define php_sleep(t) Sleep(t*1000) +#define php_sleep(t) SleepEx(t*1000, TRUE) #ifndef getcwd # define getcwd(a, b) _getcwd(a, b) #endif Modified: php/php-src/branches/PHP_5_3/win32/build/config.w32.h.in === --- php/php-src/branches/PHP_5_3/win32/build/config.w32.h.in2010-11-26 15:29:58 UTC (rev 305777) +++ php/php-src/branches/PHP_5_3/win32/build/config.w32.h.in2010-11-26 18:25:13 UTC (rev 305778) @@ -58,6 +58,7 @@ /* its in win32/time.c */ #define HAVE_USLEEP 1 #define HAVE_NANOSLEEP 1 +#define PHP_SLEEP_NON_VOID 1 #define HAVE_GETHOSTNAME 1 #define HAVE_GETCWD 1 Modified: php/php-src/branches/PHP_5_3/win32/winutil.c === --- php/php-src/branches/PHP_5_3/win32/winutil.c2010-11-26 15:29:58 UTC (rev 305777) +++ php/php-src/branches/PHP_5_3/win32/winutil.c2010-11-26 18:25:13 UTC (rev 305778) @@ -76,3 +76,4 @@ } } /* }}} */ + Modified: php/php-src/trunk/main/win95nt.h === --- php/php-src/trunk/main/win95nt.h2010-11-26 15:29:58 UTC (rev 305777) +++ php/php-src/trunk/main/win95nt.h2010-11-26 18:25:13 UTC (rev 305778) @@ -47,7 +47,7 @@ #define mkdir(a, b)_mkdir(a) #define rmdir(a) _rmdir(a) #define getpid _getpid -#define php_sleep(t) Sleep(t*1000) +#define php_sleep(t) SleepEx(t*1000, TRUE) #ifndef getcwd # define getcwd(a, b) _getcwd(a, b) #endif Modified: php/php-src/trunk/win32/build/config.w32.h.in === --- php/php-src/trunk/win32/build/config.w32.h.in 2010-11-26 15:29:58 UTC (rev 305777) +++ php/php-src/trunk/win32/build/config.w32.h.in 2010-11-26 18:25:13 UTC (rev 305778) @@ -57,6 +57,7 @@ /* its in win32/time.c */ #define HAVE_USLEEP 1 #define HAVE_NANOSLEEP 1 +#define PHP_SLEEP_NON_VOID 1 #define HAVE_GETHOSTNAME 1 #define HAVE_GETCWD 1 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ Zend/zend_language_scanner.c Zend/zend_language_scanner_defs.h ext/com_dotnet/com_com.c ext/com_dotnet/com_dotnet.c ext/com_dotnet/com_misc.c ext/com_dotnet/com_olec
pajoye Thu, 25 Nov 2010 23:06:12 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305761 Log: - cleanup broken double definition of php_win_err and rename it while being there Changed paths: U php/php-src/trunk/Zend/zend_language_scanner.c U php/php-src/trunk/Zend/zend_language_scanner_defs.h U php/php-src/trunk/ext/com_dotnet/com_com.c U php/php-src/trunk/ext/com_dotnet/com_dotnet.c U php/php-src/trunk/ext/com_dotnet/com_misc.c U php/php-src/trunk/ext/com_dotnet/com_olechar.c U php/php-src/trunk/ext/com_dotnet/com_variant.c U php/php-src/trunk/ext/com_dotnet/php_com_dotnet_internal.h U php/php-src/trunk/win32/winutil.c U php/php-src/trunk/win32/winutil.h Modified: php/php-src/trunk/Zend/zend_language_scanner.c === --- php/php-src/trunk/Zend/zend_language_scanner.c 2010-11-25 22:49:58 UTC (rev 305760) +++ php/php-src/trunk/Zend/zend_language_scanner.c 2010-11-25 23:06:12 UTC (rev 305761) @@ -1,4 +1,4 @@ -/* Generated by re2c 0.13.5 on Wed Nov 24 08:41:46 2010 */ +/* Generated by re2c 0.13.5 on Thu Nov 25 23:17:48 2010 */ #line 1 Zend/zend_language_scanner.l /* +--+ Modified: php/php-src/trunk/Zend/zend_language_scanner_defs.h === --- php/php-src/trunk/Zend/zend_language_scanner_defs.h 2010-11-25 22:49:58 UTC (rev 305760) +++ php/php-src/trunk/Zend/zend_language_scanner_defs.h 2010-11-25 23:06:12 UTC (rev 305761) @@ -1,4 +1,4 @@ -/* Generated by re2c 0.13.5 on Wed Nov 24 08:41:46 2010 */ +/* Generated by re2c 0.13.5 on Thu Nov 25 23:17:48 2010 */ #line 3 Zend/zend_language_scanner_defs.h enum YYCONDTYPE { Modified: php/php-src/trunk/ext/com_dotnet/com_com.c === --- php/php-src/trunk/ext/com_dotnet/com_com.c 2010-11-25 22:49:58 UTC (rev 305760) +++ php/php-src/trunk/ext/com_dotnet/com_com.c 2010-11-25 23:06:12 UTC (rev 305761) @@ -224,7 +224,7 @@ if (FAILED(res)) { char *werr, *msg; - werr = php_win_err(res); + werr = php_win32_error_to_msg(res); spprintf(msg, 0, Failed to create COM object `%s': %s, module_name, werr); LocalFree(werr); @@ -383,7 +383,7 @@ case DISP_E_PARAMNOTFOUND: case DISP_E_TYPEMISMATCH: - desc = php_win_err(hr); + desc = php_win32_error_to_msg(hr); spprintf(msg, 0, Parameter %d: %s, arg_err, desc); LocalFree(desc); break; @@ -399,7 +399,7 @@ /* else fall through */ default: - desc = php_win_err(hr); + desc = php_win32_error_to_msg(hr); spprintf(msg, 0, Error [0x%08x] %s, hr, desc); LocalFree(desc); break; @@ -481,7 +481,7 @@ if (FAILED(hr)) { char *winerr = NULL; char *msg = NULL; - winerr = php_win_err(hr); + winerr = php_win32_error_to_msg(hr); spprintf(msg, 0, Unable to lookup `%s': %s, name, winerr); LocalFree(winerr); php_com_throw_exception(hr, msg TSRMLS_CC); @@ -640,7 +640,7 @@ hr = php_com_get_id_of_name(obj, name, namelen, dispid TSRMLS_CC); if (FAILED(hr)) { - winerr = php_win_err(hr); + winerr = php_win32_error_to_msg(hr); spprintf(msg, 0, Unable to lookup `%s': %s, name, winerr); LocalFree(winerr); php_com_throw_exception(hr, msg TSRMLS_CC); Modified: php/php-src/trunk/ext/com_dotnet/com_dotnet.c === --- php/php-src/trunk/ext/com_dotnet/com_dotnet.c 2010-11-25 22:49:58 UTC (rev 305760) +++ php/php-src/trunk/ext/com_dotnet/com_dotnet.c 2010-11-25 23:06:12 UTC (rev 305761) @@ -199,7 +199,7 @@ hr = dotnet_init(where TSRMLS_CC); if (FAILED(hr)) { char buf[1024]; - char *err = php_win_err(hr); + char *err = php_win32_error_to_msg(hr); snprintf(buf, sizeof(buf), Failed to init .Net runtime [%s] %s, where, err); if (err) LocalFree(err); @@ -278,7 +278,7 @@ if (ret == FAILURE) { char buf[1024]; - char *err = php_win_err(hr); + char *err = php_win32_error_to_msg(hr);
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/main/fopen_wrappers.c trunk/main/fopen_wrappers.c
pajoye Tue, 23 Nov 2010 22:14:54 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305698 Log: - fixed #53352 Bug: http://bugs.php.net/53352 (Assigned) open_basedir does not pass through files with matching path Changed paths: U php/php-src/branches/PHP_5_3/main/fopen_wrappers.c U php/php-src/trunk/main/fopen_wrappers.c Modified: php/php-src/branches/PHP_5_3/main/fopen_wrappers.c === --- php/php-src/branches/PHP_5_3/main/fopen_wrappers.c 2010-11-23 21:49:18 UTC (rev 305697) +++ php/php-src/branches/PHP_5_3/main/fopen_wrappers.c 2010-11-23 22:14:54 UTC (rev 305698) @@ -234,6 +234,9 @@ resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR; resolved_basedir[++resolved_basedir_len] = '\0'; } + } else { + resolved_basedir[resolved_basedir_len++] = PHP_DIR_SEPARATOR; + resolved_basedir[resolved_basedir_len] = '\0'; } resolved_name_len = strlen(resolved_name); @@ -251,7 +254,7 @@ if (strncmp(resolved_basedir, resolved_name, resolved_basedir_len) == 0) { #endif if (resolved_name_len resolved_basedir_len - resolved_name[resolved_basedir_len] != PHP_DIR_SEPARATOR) { + resolved_name[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) { return -1; } else { /* File is in the right directory */ Modified: php/php-src/trunk/main/fopen_wrappers.c === --- php/php-src/trunk/main/fopen_wrappers.c 2010-11-23 21:49:18 UTC (rev 305697) +++ php/php-src/trunk/main/fopen_wrappers.c 2010-11-23 22:14:54 UTC (rev 305698) @@ -233,6 +233,9 @@ resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR; resolved_basedir[++resolved_basedir_len] = '\0'; } + } else { + resolved_basedir[resolved_basedir_len++] = PHP_DIR_SEPARATOR; + resolved_basedir[resolved_basedir_len] = '\0'; } resolved_name_len = strlen(resolved_name); @@ -250,7 +253,7 @@ if (strncmp(resolved_basedir, resolved_name, resolved_basedir_len) == 0) { #endif if (resolved_name_len resolved_basedir_len - resolved_name[resolved_basedir_len] != PHP_DIR_SEPARATOR) { + resolved_name[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) { return -1; } else { /* File is in the right directory */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/intl/dateformat/dateformat_format.c branches/PHP_5_3/ext/intl/tests/dateformat_format.phpt trunk/ext/intl/dateformat/datefor
not saying that it is not cool to finally have that but we are in the RC phase On Sat, Nov 20, 2010 at 3:09 AM, Stanislav Malyshev s...@php.net wrote: stas Sat, 20 Nov 2010 02:09:04 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305580 Log: Add support for DateTime in datefmt_format Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/intl/dateformat/dateformat_format.c U php/php-src/branches/PHP_5_3/ext/intl/tests/dateformat_format.phpt U php/php-src/trunk/ext/intl/dateformat/dateformat_format.c U php/php-src/trunk/ext/intl/tests/dateformat_format.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ Zend/zend_vm_execute.h ext/bz2/bz2.c ext/com_dotnet/com_persist.c ext/enchant/enchant.c ext/fileinfo/fileinfo.c ext/gd/gd.c ext/gd/gd_ctx.c ext/imap/php_i
pajoye Thu, 18 Nov 2010 15:22:22 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305507 Log: - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus Bug: http://bugs.php.net/39863 (Open) file_exists() silently truncates after a null byte Changed paths: U php/php-src/branches/PHP_5_3/Zend/zend_vm_execute.h U php/php-src/branches/PHP_5_3/ext/bz2/bz2.c U php/php-src/branches/PHP_5_3/ext/com_dotnet/com_persist.c U php/php-src/branches/PHP_5_3/ext/enchant/enchant.c U php/php-src/branches/PHP_5_3/ext/fileinfo/fileinfo.c U php/php-src/branches/PHP_5_3/ext/gd/gd.c U php/php-src/branches/PHP_5_3/ext/gd/gd_ctx.c U php/php-src/branches/PHP_5_3/ext/imap/php_imap.c U php/php-src/branches/PHP_5_3/ext/oci8/oci8_interface.c U php/php-src/branches/PHP_5_3/ext/odbc/php_odbc.c U php/php-src/branches/PHP_5_3/ext/openssl/openssl.c U php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c U php/php-src/branches/PHP_5_3/ext/posix/posix.c U php/php-src/branches/PHP_5_3/ext/pspell/pspell.c U php/php-src/branches/PHP_5_3/ext/sqlite/sqlite.c U php/php-src/branches/PHP_5_3/ext/sqlite3/sqlite3.c U php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c U php/php-src/branches/PHP_5_3/ext/standard/dir.c U php/php-src/branches/PHP_5_3/ext/standard/file.c U php/php-src/branches/PHP_5_3/ext/standard/filestat.c U php/php-src/branches/PHP_5_3/ext/standard/ftok.c U php/php-src/branches/PHP_5_3/ext/standard/iptc.c U php/php-src/branches/PHP_5_3/ext/standard/link.c U php/php-src/branches/PHP_5_3/ext/tidy/tidy.c U php/php-src/branches/PHP_5_3/ext/xsl/xsltprocessor.c U php/php-src/branches/PHP_5_3/ext/zip/php_zip.c U php/php-src/branches/PHP_5_3/main/fopen_wrappers.c Modified: php/php-src/branches/PHP_5_3/Zend/zend_vm_execute.h === --- php/php-src/branches/PHP_5_3/Zend/zend_vm_execute.h 2010-11-18 14:59:28 UTC (rev 305506) +++ php/php-src/branches/PHP_5_3/Zend/zend_vm_execute.h 2010-11-18 15:22:22 UTC (rev 305507) @@ -1880,6 +1880,16 @@ return_value_used = RETURN_VALUE_USED(opline); + if (Z_LVAL(opline-op2.u.constant) != ZEND_EVAL strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) { + if (Z_LVAL(opline-op2.u.constant)==ZEND_INCLUDE_ONCE || + Z_LVAL(opline-op2.u.constant)==ZEND_INCLUDE) { + zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC); + } else { + zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC); + } + goto done; + } + switch (Z_LVAL(opline-op2.u.constant)) { case ZEND_INCLUDE_ONCE: case ZEND_REQUIRE_ONCE: { @@ -1933,6 +1943,7 @@ break; EMPTY_SWITCH_DEFAULT_CASE() } +done: if (inc_filename==tmp_inc_filename) { zval_dtor(tmp_inc_filename); } @@ -5154,6 +5165,16 @@ return_value_used = RETURN_VALUE_USED(opline); + if (Z_LVAL(opline-op2.u.constant) != ZEND_EVAL strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) { + if (Z_LVAL(opline-op2.u.constant)==ZEND_INCLUDE_ONCE || + Z_LVAL(opline-op2.u.constant)==ZEND_INCLUDE) { + zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC); + } else { + zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC); + } + goto done; + } + switch (Z_LVAL(opline-op2.u.constant)) { case ZEND_INCLUDE_ONCE: case ZEND_REQUIRE_ONCE: { @@ -5207,6 +5228,7 @@ break; EMPTY_SWITCH_DEFAULT_CASE() } +done: if (inc_filename==tmp_inc_filename) { zval_dtor(tmp_inc_filename); } @@ -8524,6 +8546,16 @@ return_value_used = RETURN_VALUE_USED(opline); + if (Z_LVAL(opline-op2.u.constant) != ZEND_EVAL strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) { + if (Z_LVAL(opline-op2.u.constant)==ZEND_INCLUDE_ONCE || + Z_LVAL(opline-op2.u.constant)==ZEND_INCLUDE) { + zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC); + } else { + zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC); + } + goto done; + } + switch (Z_LVAL(opline-op2.u.constant)) { case ZEND_INCLUDE_ONCE: case ZEND_REQUIRE_ONCE: { @@ -8577,6 +8609,7 @@ break; EMPTY_SWITCH_DEFAULT_CASE() } +done: if (inc_filename==tmp_inc_filename) { zval_dtor(tmp_inc_filename); } @@ -22387,6 +22420,16 @@ return_value_used = RETURN_VALUE_USED(opline); + if (Z_LVAL(opline-op2.u.constant) != ZEND_EVAL strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) { + if (Z_LVAL(opline-op2.u.constant)==ZEND_INCLUDE_ONCE || + Z_LVAL(opline-op2.u.constant)==ZEND_INCLUDE) { +
Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ Zend/zend_vm_execute.h ext/bz2/bz2.c ext/com_dotnet/com_persist.c ext/enchant/enchant.c ext/fileinfo/fileinfo.c ext/gd/gd.c ext/gd/gd_ctx.c ext/imap/p
Hi Chris, To commit this patch alone in OCI was not the best thing to do... Please revert the part of my commit as you wish, I sadly don't have the time now to figure out what you meant (builds just fine here). On Thu, Nov 18, 2010 at 4:41 PM, Christopher Jones christopher.jo...@oracle.com wrote: Hi Pierre, Can you revert the change to oci8_interface.c? (i) The chunk is in the wrong place and the file won't compile (ii) I previously added the check in http://svn.php.net/viewvc?view=revisionrevision=305412 Thanks Chris On 11/18/10 7:22 AM, Pierre Joye wrote: pajoye Thu, 18 Nov 2010 15:22:22 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305507 Log: - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus Bug: http://bugs.php.net/39863 (Open) file_exists() silently truncates after a null byte Changed paths: U php/php-src/branches/PHP_5_3/Zend/zend_vm_execute.h U php/php-src/branches/PHP_5_3/ext/bz2/bz2.c U php/php-src/branches/PHP_5_3/ext/com_dotnet/com_persist.c U php/php-src/branches/PHP_5_3/ext/enchant/enchant.c U php/php-src/branches/PHP_5_3/ext/fileinfo/fileinfo.c U php/php-src/branches/PHP_5_3/ext/gd/gd.c U php/php-src/branches/PHP_5_3/ext/gd/gd_ctx.c U php/php-src/branches/PHP_5_3/ext/imap/php_imap.c U php/php-src/branches/PHP_5_3/ext/oci8/oci8_interface.c U php/php-src/branches/PHP_5_3/ext/odbc/php_odbc.c U php/php-src/branches/PHP_5_3/ext/openssl/openssl.c U php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c U php/php-src/branches/PHP_5_3/ext/posix/posix.c U php/php-src/branches/PHP_5_3/ext/pspell/pspell.c U php/php-src/branches/PHP_5_3/ext/sqlite/sqlite.c U php/php-src/branches/PHP_5_3/ext/sqlite3/sqlite3.c U php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c U php/php-src/branches/PHP_5_3/ext/standard/dir.c U php/php-src/branches/PHP_5_3/ext/standard/file.c U php/php-src/branches/PHP_5_3/ext/standard/filestat.c U php/php-src/branches/PHP_5_3/ext/standard/ftok.c U php/php-src/branches/PHP_5_3/ext/standard/iptc.c U php/php-src/branches/PHP_5_3/ext/standard/link.c U php/php-src/branches/PHP_5_3/ext/tidy/tidy.c U php/php-src/branches/PHP_5_3/ext/xsl/xsltprocessor.c U php/php-src/branches/PHP_5_3/ext/zip/php_zip.c U php/php-src/branches/PHP_5_3/main/fopen_wrappers.c -- Email: christopher.jo...@oracle.com Tel: +1 650 506 8630 Blog: http://blogs.oracle.com/opal/ -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/oci8/ oci8_interface.c
pajoye Thu, 18 Nov 2010 16:16:26 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305509 Log: - revert part of the null fix, was already applied by Chris Changed paths: U php/php-src/branches/PHP_5_3/ext/oci8/oci8_interface.c Modified: php/php-src/branches/PHP_5_3/ext/oci8/oci8_interface.c === --- php/php-src/branches/PHP_5_3/ext/oci8/oci8_interface.c 2010-11-18 16:02:37 UTC (rev 305508) +++ php/php-src/branches/PHP_5_3/ext/oci8/oci8_interface.c 2010-11-18 16:16:26 UTC (rev 305509) @@ -276,10 +276,6 @@ return; } } - - if (strlen(filename) != filename_len) { - RETURN_FALSE; - } if (zend_hash_find(Z_OBJPROP_P(z_descriptor), descriptor, sizeof(descriptor), (void **)tmp) == FAILURE) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to find descriptor property); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ Zend/zend_vm_execute.h ext/bz2/bz2.c ext/com_dotnet/com_persist.c ext/enchant/enchant.c ext/fileinfo/fileinfo.c ext/gd/gd.c ext/gd/gd_ctx.c ext/imap/p
done On Thu, Nov 18, 2010 at 4:51 PM, Pierre Joye pierre@gmail.com wrote: Hi Chris, To commit this patch alone in OCI was not the best thing to do... Please revert the part of my commit as you wish, I sadly don't have the time now to figure out what you meant (builds just fine here). On Thu, Nov 18, 2010 at 4:41 PM, Christopher Jones christopher.jo...@oracle.com wrote: Hi Pierre, Can you revert the change to oci8_interface.c? (i) The chunk is in the wrong place and the file won't compile (ii) I previously added the check in http://svn.php.net/viewvc?view=revisionrevision=305412 Thanks Chris On 11/18/10 7:22 AM, Pierre Joye wrote: pajoye Thu, 18 Nov 2010 15:22:22 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305507 Log: - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus Bug: http://bugs.php.net/39863 (Open) file_exists() silently truncates after a null byte Changed paths: U php/php-src/branches/PHP_5_3/Zend/zend_vm_execute.h U php/php-src/branches/PHP_5_3/ext/bz2/bz2.c U php/php-src/branches/PHP_5_3/ext/com_dotnet/com_persist.c U php/php-src/branches/PHP_5_3/ext/enchant/enchant.c U php/php-src/branches/PHP_5_3/ext/fileinfo/fileinfo.c U php/php-src/branches/PHP_5_3/ext/gd/gd.c U php/php-src/branches/PHP_5_3/ext/gd/gd_ctx.c U php/php-src/branches/PHP_5_3/ext/imap/php_imap.c U php/php-src/branches/PHP_5_3/ext/oci8/oci8_interface.c U php/php-src/branches/PHP_5_3/ext/odbc/php_odbc.c U php/php-src/branches/PHP_5_3/ext/openssl/openssl.c U php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c U php/php-src/branches/PHP_5_3/ext/posix/posix.c U php/php-src/branches/PHP_5_3/ext/pspell/pspell.c U php/php-src/branches/PHP_5_3/ext/sqlite/sqlite.c U php/php-src/branches/PHP_5_3/ext/sqlite3/sqlite3.c U php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c U php/php-src/branches/PHP_5_3/ext/standard/dir.c U php/php-src/branches/PHP_5_3/ext/standard/file.c U php/php-src/branches/PHP_5_3/ext/standard/filestat.c U php/php-src/branches/PHP_5_3/ext/standard/ftok.c U php/php-src/branches/PHP_5_3/ext/standard/iptc.c U php/php-src/branches/PHP_5_3/ext/standard/link.c U php/php-src/branches/PHP_5_3/ext/tidy/tidy.c U php/php-src/branches/PHP_5_3/ext/xsl/xsltprocessor.c U php/php-src/branches/PHP_5_3/ext/zip/php_zip.c U php/php-src/branches/PHP_5_3/main/fopen_wrappers.c -- Email: christopher.jo...@oracle.com Tel: +1 650 506 8630 Blog: http://blogs.oracle.com/opal/ -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS UPGRADING
pajoye Thu, 18 Nov 2010 17:09:27 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305510 Log: - path with null entries Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/UPGRADING Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-11-18 16:16:26 UTC (rev 305509) +++ php/php-src/branches/PHP_5_3/NEWS 2010-11-18 17:09:27 UTC (rev 305510) @@ -33,6 +33,7 @@ - Added a 3rd parameter to get_html_translation_table. It now takes a charset hint, like htmlentities et al. (Gustavo) +- Path with NULL in them (foo\obar.txt) are now considered as invalid. (Rasmus) - Fixed a possible double free in imap extension (Identified by Mateusz Kocielski). (CVE-2010-4150). (Ilia) - Fixed NULL pointer dereference in ZipArchive::getArchiveComment. Modified: php/php-src/branches/PHP_5_3/UPGRADING === --- php/php-src/branches/PHP_5_3/UPGRADING 2010-11-18 16:16:26 UTC (rev 305509) +++ php/php-src/branches/PHP_5_3/UPGRADING 2010-11-18 17:09:27 UTC (rev 305510) @@ -40,6 +40,9 @@ 2. Changes made to existing functions = +- Paths containing NULL (like /some/path\0foo.txt) are now considered invalid. + See http://news.php.net/php.internals/50191 + - The HTTP stream wrapper now considers all status codes from 200 to 399 to be successful. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/Zend/zend_language_scanner.l trunk/Zend/zend_language_scanner.l
pajoye Wed, 17 Nov 2010 16:46:19 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305464 Log: - NULL deref fix, patch by Gustavo Changed paths: U php/php-src/branches/PHP_5_3/Zend/zend_language_scanner.l U php/php-src/trunk/Zend/zend_language_scanner.l Modified: php/php-src/branches/PHP_5_3/Zend/zend_language_scanner.l === --- php/php-src/branches/PHP_5_3/Zend/zend_language_scanner.l 2010-11-17 15:00:51 UTC (rev 305463) +++ php/php-src/branches/PHP_5_3/Zend/zend_language_scanner.l 2010-11-17 16:46:19 UTC (rev 305464) @@ -284,6 +284,10 @@ SCNG(script_filtered_size) = SCNG(script_org_size); } else { SCNG(input_filter)(SCNG(script_filtered), SCNG(script_filtered_size), SCNG(script_org), SCNG(script_org_size) TSRMLS_CC); + if (SCNG(script_filtered) == NULL) { + zend_error_noreturn(E_COMPILE_ERROR, Could not convert the script from the detected + encoding \%s\ to a compatible encoding, LANG_SCNG(script_encoding)-name); + } } SCNG(yy_start) = SCNG(script_filtered) - offset; yy_scan_buffer((char *)SCNG(script_filtered), SCNG(script_filtered_size) TSRMLS_CC); Modified: php/php-src/trunk/Zend/zend_language_scanner.l === --- php/php-src/trunk/Zend/zend_language_scanner.l 2010-11-17 15:00:51 UTC (rev 305463) +++ php/php-src/trunk/Zend/zend_language_scanner.l 2010-11-17 16:46:19 UTC (rev 305464) @@ -284,6 +284,10 @@ SCNG(script_filtered_size) = SCNG(script_org_size); } else { SCNG(input_filter)(SCNG(script_filtered), SCNG(script_filtered_size), SCNG(script_org), SCNG(script_org_size) TSRMLS_CC); + if (SCNG(script_filtered) == NULL) { + zend_error_noreturn(E_COMPILE_ERROR, Could not convert the script from the detected + encoding \%s\ to a compatible encoding, LANG_SCNG(script_encoding)-name); + } } SCNG(yy_start) = SCNG(script_filtered) - offset; yy_scan_buffer((char *)SCNG(script_filtered), SCNG(script_filtered_size) TSRMLS_CC); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/Zend/tests/multibyte/multibyte_encoding_006.phpt trunk/Zend/tests/multibyte/multibyte_encoding_006.phpt
pajoye Wed, 17 Nov 2010 17:26:33 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305466 Log: - test for NULL deref fix Changed paths: A php/php-src/branches/PHP_5_3/Zend/tests/multibyte/multibyte_encoding_006.phpt A php/php-src/trunk/Zend/tests/multibyte/multibyte_encoding_006.phpt Added: php/php-src/branches/PHP_5_3/Zend/tests/multibyte/multibyte_encoding_006.phpt === (Binary files differ) Property changes on: php/php-src/branches/PHP_5_3/Zend/tests/multibyte/multibyte_encoding_006.phpt ___ Added: svn:mime-type + application/octet-stream Added: php/php-src/trunk/Zend/tests/multibyte/multibyte_encoding_006.phpt === (Binary files differ) Property changes on: php/php-src/trunk/Zend/tests/multibyte/multibyte_encoding_006.phpt ___ Added: svn:mime-type + application/octet-stream -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /SVNROOT/ global_avail
pajoye Tue, 16 Nov 2010 18:39:35 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305411 Log: - htscanner karma for martynas Changed paths: U SVNROOT/global_avail Modified: SVNROOT/global_avail === --- SVNROOT/global_avail2010-11-16 16:47:18 UTC (rev 305410) +++ SVNROOT/global_avail2010-11-16 18:39:35 UTC (rev 305411) @@ -332,6 +332,7 @@ avail|cubrid|pecl/cubrid,phpdoc avail|treffynnon|pecl/ssdeep,phpdoc avail|nicolas|pecl/judy,phpdoc +avail|martynas|pecl/htscanner,phpdoc # Objective-C bridge avail|wez,jan|php/php-objc -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/pdo_firebird/firebird_driver.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/pdo_firebird/firebird_driver.c trunk/ext/pdo_fireb
) { - char tmp[200]; + char tmp[512]; case PDO_ATTR_AUTOCOMMIT: ZVAL_LONG(val,dbh-auto_commit); @@ -590,6 +590,10 @@ ZVAL_STRING(val,tmp,1); return 1; } + + case PDO_ATTR_FETCH_TABLE_NAMES: + ZVAL_BOOL(val, H-fetch_table_names); + return 1; } return 0; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/mysqlnd/ mysqlnd_debug.c
pajoye Mon, 15 Nov 2010 23:46:21 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305389 Log: - fix build Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.c Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.c === --- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.c2010-11-15 23:26:25 UTC (rev 305388) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_debug.c2010-11-15 23:46:21 UTC (rev 305389) @@ -497,20 +497,20 @@ min_in_calls=%5llu max_in_calls=%7llu avg_in_calls=%7llu min_total=%5llu max_total=%7llu avg_total=%7llu ,string_key - ,(unsigned long long) f_profile-calls - ,(unsigned long long) f_profile-own_underporm_calls - ,(unsigned long long) f_profile-in_calls_underporm_calls - ,(unsigned long long) f_profile-total_underporm_calls + ,(uint64_t) f_profile-calls + ,(uint64_t) f_profile-own_underporm_calls + ,(uint64_t) f_profile-in_calls_underporm_calls + ,(uint64_t) f_profile-total_underporm_calls - ,(unsigned long long) f_profile-min_own - ,(unsigned long long) f_profile-max_own - ,(unsigned long long) f_profile-avg_own - ,(unsigned long long) f_profile-min_in_calls - ,(unsigned long long) f_profile-max_in_calls - ,(unsigned long long) f_profile-avg_in_calls - ,(unsigned long long) f_profile-min_total - ,(unsigned long long) f_profile-max_total - ,(unsigned long long) f_profile-avg_total + ,(uint64_t) f_profile-min_own + ,(uint64_t) f_profile-max_own + ,(uint64_t) f_profile-avg_own + ,(uint64_t) f_profile-min_in_calls + ,(uint64_t) f_profile-max_in_calls + ,(uint64_t) f_profile-avg_in_calls + ,(uint64_t) f_profile-min_total + ,(uint64_t) f_profile-max_total + ,(uint64_t) f_profile-avg_total ); zend_hash_move_forward_ex(self-function_profiles, pos_values); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/mysqlnd/ mysqlnd_debug.c
pajoye Mon, 15 Nov 2010 23:53:13 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305391 Log: -fix build Changed paths: U php/php-src/trunk/ext/mysqlnd/mysqlnd_debug.c Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_debug.c === --- php/php-src/trunk/ext/mysqlnd/mysqlnd_debug.c 2010-11-15 23:46:43 UTC (rev 305390) +++ php/php-src/trunk/ext/mysqlnd/mysqlnd_debug.c 2010-11-15 23:53:13 UTC (rev 305391) @@ -497,20 +497,20 @@ min_in_calls=%5llu max_in_calls=%7llu avg_in_calls=%7llu min_total=%5llu max_total=%7llu avg_total=%7llu ,string_key - ,(unsigned long long) f_profile-calls - ,(unsigned long long) f_profile-own_underporm_calls - ,(unsigned long long) f_profile-in_calls_underporm_calls - ,(unsigned long long) f_profile-total_underporm_calls + ,(uint64_t) f_profile-calls + ,(uint64_t) f_profile-own_underporm_calls + ,(uint64_t) f_profile-in_calls_underporm_calls + ,(uint64_t) f_profile-total_underporm_calls - ,(unsigned long long) f_profile-min_own - ,(unsigned long long) f_profile-max_own - ,(unsigned long long) f_profile-avg_own - ,(unsigned long long) f_profile-min_in_calls - ,(unsigned long long) f_profile-max_in_calls - ,(unsigned long long) f_profile-avg_in_calls - ,(unsigned long long) f_profile-min_total - ,(unsigned long long) f_profile-max_total - ,(unsigned long long) f_profile-avg_total + ,(uint64_t) f_profile-min_own + ,(uint64_t) f_profile-max_own + ,(uint64_t) f_profile-avg_own + ,(uint64_t) f_profile-min_in_calls + ,(uint64_t) f_profile-max_in_calls + ,(uint64_t) f_profile-avg_in_calls + ,(uint64_t) f_profile-min_total + ,(uint64_t) f_profile-max_total + ,(uint64_t) f_profile-avg_total ); zend_hash_move_forward_ex(self-function_profiles, pos_values); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/interbase/config.w32 branches/PHP_5_3/ext/pdo_firebird/config.w32 trunk/ext/interbase/config.w32 trunk/ext/pdo_firebird/config.w32
pajoye Sun, 14 Nov 2010 22:40:30 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305343 Log: - allow firebird header to be in the normal deps directory and restore firebird support on win (5.3.4+) Changed paths: U php/php-src/branches/PHP_5_3/ext/interbase/config.w32 U php/php-src/branches/PHP_5_3/ext/pdo_firebird/config.w32 U php/php-src/trunk/ext/interbase/config.w32 U php/php-src/trunk/ext/pdo_firebird/config.w32 Modified: php/php-src/branches/PHP_5_3/ext/interbase/config.w32 === --- php/php-src/branches/PHP_5_3/ext/interbase/config.w32 2010-11-14 22:22:07 UTC (rev 305342) +++ php/php-src/branches/PHP_5_3/ext/interbase/config.w32 2010-11-14 22:40:30 UTC (rev 305343) @@ -5,7 +5,8 @@ if (PHP_INTERBASE != no) { - if (CHECK_HEADER_ADD_INCLUDE(ibase.h, CFLAGS_INTERBASE, PHP_PHP_BUILD + \\interbase\\include; + PHP_INTERBASE) + if (CHECK_HEADER_ADD_INCLUDE(ibase.h, CFLAGS_INTERBASE, + PHP_PHP_BUILD + \\include\\interbase; + PHP_PHP_BUILD + \\interbase\\include; + PHP_INTERBASE) (CHECK_LIB(fbclient_ms.lib, interbase, PHP_PHP_BUILD + \\interbase\\lib_ms; + PHP_INTERBASE) || CHECK_LIB(gds32_ms.lib, interbase, PHP_PHP_BUILD + \\interbase\\lib_ms; + PHP_INTERBASE))) { Modified: php/php-src/branches/PHP_5_3/ext/pdo_firebird/config.w32 === --- php/php-src/branches/PHP_5_3/ext/pdo_firebird/config.w322010-11-14 22:22:07 UTC (rev 305342) +++ php/php-src/branches/PHP_5_3/ext/pdo_firebird/config.w322010-11-14 22:40:30 UTC (rev 305343) @@ -7,7 +7,9 @@ if ((CHECK_LIB(fbclient_ms.lib, pdo_firebird, PHP_PHP_BUILD + \\interbase\\lib_ms; + PHP_PDO_FIREBIRD) || CHECK_LIB(gds32_ms.lib, pdo_firebird, PHP_PHP_BUILD + \\interbase\\lib_ms; + PHP_PDO_FIREBIRD) - ) CHECK_HEADER_ADD_INCLUDE(ibase.h, CFLAGS_PDO_FIREBIRD, PHP_PHP_BUILD + \\interbase\\include; + PHP_PDO_FIREBIRD)) { + ) CHECK_HEADER_ADD_INCLUDE(ibase.h, CFLAGS_PDO_FIREBIRD, + PHP_PHP_BUILD + \\include\\interbase; + PHP_PHP_BUILD + \\interbase\\include; + PHP_PDO_FIREBIRD) + ) { EXTENSION(pdo_firebird, pdo_firebird.c firebird_driver.c firebird_statement.c); } else { Modified: php/php-src/trunk/ext/interbase/config.w32 === --- php/php-src/trunk/ext/interbase/config.w32 2010-11-14 22:22:07 UTC (rev 305342) +++ php/php-src/trunk/ext/interbase/config.w32 2010-11-14 22:40:30 UTC (rev 305343) @@ -5,7 +5,8 @@ if (PHP_INTERBASE != no) { - if (CHECK_HEADER_ADD_INCLUDE(ibase.h, CFLAGS_INTERBASE, PHP_PHP_BUILD + \\interbase\\include; + PHP_INTERBASE) + if (CHECK_HEADER_ADD_INCLUDE(ibase.h, CFLAGS_INTERBASE, + PHP_PHP_BUILD + \\include\\interbase; + PHP_PHP_BUILD + \\interbase\\include; + PHP_INTERBASE) (CHECK_LIB(fbclient_ms.lib, interbase, PHP_PHP_BUILD + \\interbase\\lib_ms; + PHP_INTERBASE) || CHECK_LIB(gds32_ms.lib, interbase, PHP_PHP_BUILD + \\interbase\\lib_ms; + PHP_INTERBASE))) { Modified: php/php-src/trunk/ext/pdo_firebird/config.w32 === --- php/php-src/trunk/ext/pdo_firebird/config.w32 2010-11-14 22:22:07 UTC (rev 305342) +++ php/php-src/trunk/ext/pdo_firebird/config.w32 2010-11-14 22:40:30 UTC (rev 305343) @@ -7,7 +7,9 @@ if ((CHECK_LIB(fbclient_ms.lib, pdo_firebird, PHP_PHP_BUILD + \\interbase\\lib_ms; + PHP_PDO_FIREBIRD) || CHECK_LIB(gds32_ms.lib, pdo_firebird, PHP_PHP_BUILD + \\interbase\\lib_ms; + PHP_PDO_FIREBIRD) - ) CHECK_HEADER_ADD_INCLUDE(ibase.h, CFLAGS_PDO_FIREBIRD, PHP_PHP_BUILD + \\interbase\\include; + PHP_PDO_FIREBIRD)) { + ) CHECK_HEADER_ADD_INCLUDE(ibase.h, CFLAGS_PDO_FIREBIRD, + PHP_PHP_BUILD + \\include\\interbase; + PHP_PHP_BUILD + \\interbase\\include; + PHP_PDO_FIREBIRD) + ) { EXTENSION(pdo_firebird, pdo_firebird.c firebird_driver.c firebird_statement.c); } else { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ UPGRADING
pajoye Sun, 07 Nov 2010 19:55:08 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305176 Log: - typo Changed paths: U php/php-src/trunk/UPGRADING Modified: php/php-src/trunk/UPGRADING === --- php/php-src/trunk/UPGRADING 2010-11-07 19:53:45 UTC (rev 305175) +++ php/php-src/trunk/UPGRADING 2010-11-07 19:55:08 UTC (rev 305176) @@ -224,7 +224,7 @@ 9. Changes in SAPI support == -- The REQUEST_TIME value insde server now returns a floating point number +- The REQUEST_TIME value inside server now returns a floating point number indicating the time with microsecond precision. All SAPIs provinding this value should be returning float and not time_t. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS main/SAPI.c main/SAPI.h main/php_variables.c sapi/apache/mod_php5.c sapi/apache2filter/sapi_apache2.c sapi/apache2handler/sapi_apache2.c sapi/nsapi/nsapi.c
@@ return OK; } -static time_t php_apache_sapi_get_request_time(TSRMLS_D) +static double php_apache_sapi_get_request_time(TSRMLS_D) { php_struct *ctx = SG(server_context); - return apr_time_sec(ctx-r-request_time); + return apr_time_as_msec(ctx-r-request_time); } extern zend_module_entry php_apache_module; Modified: php/php-src/trunk/sapi/apache2handler/sapi_apache2.c === --- php/php-src/trunk/sapi/apache2handler/sapi_apache2.c 2010-11-06 16:24:58 UTC (rev 305128) +++ php/php-src/trunk/sapi/apache2handler/sapi_apache2.c 2010-11-06 17:14:21 UTC (rev 305129) @@ -335,10 +335,10 @@ } } -static time_t php_apache_sapi_get_request_time(TSRMLS_D) +static double php_apache_sapi_get_request_time(TSRMLS_D) { php_struct *ctx = SG(server_context); - return apr_time_sec(ctx-r-request_time); + return apr_time_as_msec(ctx-r-request_time); } extern zend_module_entry php_apache_module; Modified: php/php-src/trunk/sapi/nsapi/nsapi.c === --- php/php-src/trunk/sapi/nsapi/nsapi.c 2010-11-06 16:24:58 UTC (rev 305128) +++ php/php-src/trunk/sapi/nsapi/nsapi.c 2010-11-06 17:14:21 UTC (rev 305129) @@ -784,7 +784,7 @@ } } -static time_t sapi_nsapi_get_request_time(TSRMLS_D) +static double sapi_nsapi_get_request_time(TSRMLS_D) { return REQ_TIME( ((nsapi_request_context *)SG(server_context))-rq ); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/ PHP_5_2/NEWS PHP_5_3/NEWS
pajoye Wed, 03 Nov 2010 20:22:08 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305062 Log: - add CVE Changed paths: U php/php-src/branches/PHP_5_2/NEWS U php/php-src/branches/PHP_5_3/NEWS Modified: php/php-src/branches/PHP_5_2/NEWS === --- php/php-src/branches/PHP_5_2/NEWS 2010-11-03 18:52:29 UTC (rev 305061) +++ php/php-src/branches/PHP_5_2/NEWS 2010-11-03 20:22:08 UTC (rev 305062) @@ -2,7 +2,7 @@ ||| ?? ??? 2010, PHP 5.2.15 - Fixed a possible double free in imap extension (Identified by Mateusz - Kocielski). (Ilia) + Kocielski). (CVE-2010-4150). (Ilia) - Fixed possible flaw in open_basedir (CVE-2010-3436). (Pierre) - Fixed possible crash in mssql_fetch_batch(). (Kalle) Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-11-03 18:52:29 UTC (rev 305061) +++ php/php-src/branches/PHP_5_3/NEWS 2010-11-03 20:22:08 UTC (rev 305062) @@ -26,7 +26,7 @@ disables zlib.output_compression. - Fixed a possible double free in imap extension (Identified by Mateusz - Kocielski). (Ilia) + Kocielski). (CVE-2010-4150). (Ilia) - Fixed NULL pointer dereference in ZipArchive::getArchiveComment. (CVE-2010-3709). (Maksymilian Arciemowicz) - Fixed possible flaw in open_basedir (CVE-2010-3436). (Pierre) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/zip/zip_stream.c trunk/ext/zip/zip_stream.c
pajoye Wed, 03 Nov 2010 21:48:08 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305063 Log: - add stat support for zip:// Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/zip/zip_stream.c U php/php-src/trunk/ext/zip/zip_stream.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-11-03 20:22:08 UTC (rev 305062) +++ php/php-src/branches/PHP_5_3/NEWS 2010-11-03 21:48:08 UTC (rev 305063) @@ -7,6 +7,7 @@ - Reverted fix for bug #51176 (Static calling in non-static method behaves like $this-). (Felipe) +- Added stat support for zip stream. (Pierre) - Added follow_location (enabled by default) option for the http stream support. (Pierre) - Added new character sets to mysqlnd, which are available in MySQL 5.5 Modified: php/php-src/branches/PHP_5_3/ext/zip/zip_stream.c === --- php/php-src/branches/PHP_5_3/ext/zip/zip_stream.c 2010-11-03 20:22:08 UTC (rev 305062) +++ php/php-src/branches/PHP_5_3/ext/zip/zip_stream.c 2010-11-03 21:48:08 UTC (rev 305063) @@ -95,13 +95,91 @@ } /* }}} */ +static int php_zip_ops_stat(php_stream *stream, php_stream_statbuf *ssb TSRMLS_DC) /* {{{ */ +{ + struct zip_stat sb; + const char *path = stream-orig_path; + int path_len = strlen(stream-orig_path); + char *file_basename; + size_t file_basename_len; + char file_dirname[MAXPATHLEN]; + struct zip *za; + struct zip_file *zf = NULL; + char *fragment; + int fragment_len; + int err; + + fragment = strchr(path, '#'); + if (!fragment) { + return -1; + } + + + if (strncasecmp(zip://, path, 6) == 0) { + path += 6; + } + + fragment_len = strlen(fragment); + + if (fragment_len 1) { + return -1; + } + path_len = strlen(path); + if (path_len = MAXPATHLEN) { + return -1; + } + + memcpy(file_dirname, path, path_len - fragment_len); + file_dirname[path_len - fragment_len] = '\0'; + + php_basename((char *)path, path_len - fragment_len, NULL, 0, file_basename, file_basename_len TSRMLS_CC); + fragment++; + + if (ZIP_OPENBASEDIR_CHECKPATH(file_dirname)) { + efree(file_basename); + return -1; + } + + za = zip_open(file_dirname, ZIP_CREATE, err); + if (za) { + memset(ssb, 0, sizeof(php_stream_statbuf)); + if (zip_stat(za, fragment, ZIP_FL_NOCASE, sb) != 0) { + efree(file_basename); + return -1; + } + zip_close(za); + + if (path[path_len-1] != '/') { + ssb-sb.st_size = sb.size; + ssb-sb.st_mode |= S_IFREG; /* regular file */ + } else { + ssb-sb.st_size = 0; + ssb-sb.st_mode |= S_IFDIR; /* regular directory */ + } + + ssb-sb.st_mtime = sb.mtime; + ssb-sb.st_atime = sb.mtime; + ssb-sb.st_ctime = sb.mtime; + ssb-sb.st_nlink = 1; + ssb-sb.st_rdev = -1; +#ifndef PHP_WIN32 + ssb-sb.st_blksize = -1; + ssb-sb.st_blocks = -1; +#endif + ssb-sb.st_ino = -1; + } + efree(file_basename); + return 0; +} +/* }}} */ + php_stream_ops php_stream_zipio_ops = { php_zip_ops_write, php_zip_ops_read, php_zip_ops_close, php_zip_ops_flush, zip, NULL, /* seek */ NULL, /* cast */ - NULL, /* stat */ + php_zip_ops_stat, /* stat */ NULL /* set_option */ }; Modified: php/php-src/trunk/ext/zip/zip_stream.c === --- php/php-src/trunk/ext/zip/zip_stream.c 2010-11-03 20:22:08 UTC (rev 305062) +++ php/php-src/trunk/ext/zip/zip_stream.c 2010-11-03 21:48:08 UTC (rev 305063) @@ -95,13 +95,91 @@ } /* }}} */ +static int php_zip_ops_stat(php_stream *stream, php_stream_statbuf *ssb TSRMLS_DC) /* {{{ */ +{ + struct zip_stat sb; + const char *path = stream-orig_path; + int path_len = strlen(stream-orig_path); + char *file_basename; + size_t file_basename_len; + char file_dirname[MAXPATHLEN]; + struct zip *za; + struct zip_file *zf = NULL; + char *fragment; + int fragment_len; + int err; + + fragment = strchr(path, '#'); + if (!fragment) { + return -1; + } + + + if (strncasecmp(zip://, path, 6) == 0) { + path += 6; + } + + fragment_len = strlen(fragment); + + if (fragment_len 1) { + return -1
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/zip/zip_stream.c trunk/ext/zip/zip_stream.c
pajoye Wed, 03 Nov 2010 21:50:03 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305064 Log: - fix type and silent warning Changed paths: U php/php-src/branches/PHP_5_3/ext/zip/zip_stream.c U php/php-src/trunk/ext/zip/zip_stream.c Modified: php/php-src/branches/PHP_5_3/ext/zip/zip_stream.c === --- php/php-src/branches/PHP_5_3/ext/zip/zip_stream.c 2010-11-03 21:48:08 UTC (rev 305063) +++ php/php-src/branches/PHP_5_3/ext/zip/zip_stream.c 2010-11-03 21:50:03 UTC (rev 305064) @@ -30,7 +30,7 @@ /* {{{ php_zip_ops_read */ static size_t php_zip_ops_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) { - int n = 0; + size_t n = 0; STREAM_DATA_FROM_STREAM(); if (self-za self-zf) { Modified: php/php-src/trunk/ext/zip/zip_stream.c === --- php/php-src/trunk/ext/zip/zip_stream.c 2010-11-03 21:48:08 UTC (rev 305063) +++ php/php-src/trunk/ext/zip/zip_stream.c 2010-11-03 21:50:03 UTC (rev 305064) @@ -30,7 +30,7 @@ /* {{{ php_zip_ops_read */ static size_t php_zip_ops_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) { - int n = 0; + size_t n = 0; STREAM_DATA_FROM_STREAM(); if (self-za self-zf) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/TSRM/ tsrm_virtual_cwd.c tsrm_virtual_cwd.h
pajoye Thu, 04 Nov 2010 01:16:20 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305070 Log: - expose php_sys_(l)stat, doing will prevent me to have to provide pecl's builds for 5.3.3 and another set for 5.3.4+. Trunk remains the same, A(B/P)I can be broken there Changed paths: U php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c U php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h Modified: php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c === --- php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c2010-11-03 22:25:14 UTC (rev 305069) +++ php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c2010-11-04 01:16:20 UTC (rev 305070) @@ -277,6 +277,18 @@ } /* }}} */ +CWD_API int php_sys_stat(const char *path, struct stat *buf) /* {{{ */ +{ + return php_sys_stat_ex(path, buf, 0); +} +/* }}} */ + +CWD_API int php_sys_lstat(const char *path, struct stat *buf) /* {{{ */ +{ + return php_sys_stat_ex(path, buf, 1); +} +/* }}} */ + CWD_API int php_sys_stat_ex(const char *path, struct stat *buf, int lstat) /* {{{ */ { WIN32_FILE_ATTRIBUTE_DATA data; Modified: php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h === --- php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h2010-11-03 22:25:14 UTC (rev 305069) +++ php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h2010-11-04 01:16:20 UTC (rev 305070) @@ -131,8 +131,8 @@ #ifdef TSRM_WIN32 CWD_API int php_sys_stat_ex(const char *path, struct stat *buf, int lstat); -# define php_sys_stat(path, buf) php_sys_stat_ex(path, buf, 0) -# define php_sys_lstat(path, buf) php_sys_stat_ex(path, buf, 1) +CWD_API int php_sys_stat(const char *path, struct stat *buf); +CWD_API int php_sys_lstat(const char *path, struct stat *buf); CWD_API int php_sys_readlink(const char *link, char *target, size_t target_len); #else # define php_sys_stat stat -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS
pajoye Tue, 02 Nov 2010 15:33:49 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305030 Log: - add CVE id Changed paths: U php/php-src/branches/PHP_5_3/NEWS Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-11-02 15:02:48 UTC (rev 305029) +++ php/php-src/branches/PHP_5_3/NEWS 2010-11-02 15:33:49 UTC (rev 305030) @@ -159,7 +159,7 @@ - Fixed bug #50345 (nanosleep not detected properly on some solaris versions). (Ulf, Tony) - Fixed bug #49687 (utf8_decode vulnerabilities and deficiencies in the number - of reported malformed sequences). (Gustavo) + of reported malformed sequences). (CVE-2010-3870) (Gustavo) - Fixed bug #49407 (get_html_translation_table doesn't handle UTF-8). (Gustavo) - Fixed bug #49215 (make fails on glob_wrapper). (Felipe) - Fixed bug #48831 (php -i has different output to php --ini). (Richard, -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/trunk/ UPGRADING ext/reflection/php_reflection.c ext/reflection/tests/ReflectionParameter_canBePassedByValue.phpt
: arg2 +Is passed by reference: no +Can be passed by value: yes + +Done. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/recode/CREDITS branches/PHP_5_3/ext/recode/CREDITS trunk/ext/recode/CREDITS
pajoye Sun, 24 Oct 2010 21:51:54 + Revision: http://svn.php.net/viewvc?view=revisionrevision=304717 Log: - fix Isotopp Changed paths: U php/php-src/branches/PHP_5_2/ext/recode/CREDITS U php/php-src/branches/PHP_5_3/ext/recode/CREDITS U php/php-src/trunk/ext/recode/CREDITS Modified: php/php-src/branches/PHP_5_2/ext/recode/CREDITS === --- php/php-src/branches/PHP_5_2/ext/recode/CREDITS 2010-10-24 21:28:26 UTC (rev 304716) +++ php/php-src/branches/PHP_5_2/ext/recode/CREDITS 2010-10-24 21:51:54 UTC (rev 304717) @@ -1,2 +1,2 @@ Recode -Kristian K�hntopp +Kristian Koehntopp Modified: php/php-src/branches/PHP_5_3/ext/recode/CREDITS === --- php/php-src/branches/PHP_5_3/ext/recode/CREDITS 2010-10-24 21:28:26 UTC (rev 304716) +++ php/php-src/branches/PHP_5_3/ext/recode/CREDITS 2010-10-24 21:51:54 UTC (rev 304717) @@ -1,2 +1,2 @@ Recode -Kristian Köhntopp +Kristian Koehntopp Modified: php/php-src/trunk/ext/recode/CREDITS === --- php/php-src/trunk/ext/recode/CREDITS2010-10-24 21:28:26 UTC (rev 304716) +++ php/php-src/trunk/ext/recode/CREDITS2010-10-24 21:51:54 UTC (rev 304717) @@ -1,2 +1,2 @@ Recode -Kristian Köhntopp +Kristian Koehntopp -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/ PHP_5_2/ext/zip/php_zip.c PHP_5_3/ext/zip/php_zip.c
pajoye Tue, 19 Oct 2010 09:55:36 + Revision: http://svn.php.net/viewvc?view=revisionrevision=304505 Log: - fix Fixed NULL pointer dereference in ZipArchive::getArchiveComment, (CVE-2010-3709), reportpatch from Maksymilian Arciemowicz Changed paths: U php/php-src/branches/PHP_5_2/ext/zip/php_zip.c U php/php-src/branches/PHP_5_3/ext/zip/php_zip.c Modified: php/php-src/branches/PHP_5_2/ext/zip/php_zip.c === --- php/php-src/branches/PHP_5_2/ext/zip/php_zip.c 2010-10-19 09:53:43 UTC (rev 304504) +++ php/php-src/branches/PHP_5_2/ext/zip/php_zip.c 2010-10-19 09:55:36 UTC (rev 304505) @@ -1954,6 +1954,9 @@ PHP_ZIP_STAT_INDEX(intern, index, 0, sb); comment = zip_get_file_comment(intern, index, comment_len, (int)flags); + if(comment==NULL) { + RETURN_FALSE; + } RETURN_STRINGL((char *)comment, (long)comment_len, 1); } /* }}} */ Modified: php/php-src/branches/PHP_5_3/ext/zip/php_zip.c === --- php/php-src/branches/PHP_5_3/ext/zip/php_zip.c 2010-10-19 09:53:43 UTC (rev 304504) +++ php/php-src/branches/PHP_5_3/ext/zip/php_zip.c 2010-10-19 09:55:36 UTC (rev 304505) @@ -1961,6 +1961,9 @@ } comment = zip_get_archive_comment(intern, comment_len, (int)flags); + if(comment==NULL) { + RETURN_FALSE; + } RETURN_STRINGL((char *)comment, (long)comment_len, 1); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/zip/ php_zip.c
pajoye Tue, 19 Oct 2010 09:56:11 + Revision: http://svn.php.net/viewvc?view=revisionrevision=304506 Log: - fix Fixed NULL pointer dereference in ZipArchive::getArchiveComment, (CVE-2010-3709), reportpatch from Maksymilian Arciemowicz Changed paths: U php/php-src/trunk/ext/zip/php_zip.c Modified: php/php-src/trunk/ext/zip/php_zip.c === --- php/php-src/trunk/ext/zip/php_zip.c 2010-10-19 09:55:36 UTC (rev 304505) +++ php/php-src/trunk/ext/zip/php_zip.c 2010-10-19 09:56:11 UTC (rev 304506) @@ -1974,6 +1974,9 @@ } comment = zip_get_archive_comment(intern, comment_len, (int)flags); + if(comment==NULL) { + RETURN_FALSE; + } RETURN_STRINGL((char *)comment, (long)comment_len, 1); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS
pajoye Tue, 19 Oct 2010 09:56:59 + Revision: http://svn.php.net/viewvc?view=revisionrevision=304507 Log: - update #52929 and zip NULL deref Bug: http://bugs.php.net/52929 (Closed) Segfault in filter_var with FILTER_VALIDATE_EMAIL with large amount of data Changed paths: U php/php-src/branches/PHP_5_3/NEWS Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-10-19 09:56:11 UTC (rev 304506) +++ php/php-src/branches/PHP_5_3/NEWS 2010-10-19 09:56:59 UTC (rev 304507) @@ -18,6 +18,8 @@ - Added a 3rd parameter to get_html_translation_table. It now takes a charset hint, like htmlentities et al. (Gustavo) +- Fixed NULL pointer dereference in ZipArchive::getArchiveComment. + (CVE-2010-3709). (Maksymilian Arciemowicz) - Fixed possible flaw in open_basedir (CVE-2010-3436). (Pierre) - Fixed MOPS-2010-24, fix string validation. (CVE-2010-2950). (Pierre) - Fixed symbolic resolution support when the target is a DFS share. (Pierre) @@ -35,6 +37,8 @@ than was requested was skipped. (Gustavo) - Fixed htmlentities/htmlspecialchars accepting certain ill-formed UTF-8 sequences. (Gustavo) +- Fixed bug #52929 (Segfault in filter_var with FILTER_VALIDATE_EMAIL with + large amount of data) (CVE-2010-3710). (Adam) - Fixed bug #53006 (stream_get_contents has an unpredictable behavior when the underlying stream does not support seeking). (Gustavo) @@ -57,8 +61,6 @@ headers). (Adam) - Fixed bug #52931 (strripos not overloaded with function overloading enabled). (Felipe) -- Fixed bug #52929 (Segfault in filter_var with FILTER_VALIDATE_EMAIL with - large amount of data). (Adam) - Fixed bug #52926 (zlib fopen wrapper does not use context). (Gustavo) - Fixed bug #52906 (gmp_mod returns negative result when non-negative is expected). (Stas) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_2/ NEWS
pajoye Tue, 19 Oct 2010 10:16:58 + Revision: http://svn.php.net/viewvc?view=revisionrevision=304508 Log: - update #52929 and zip NULL deref Bug: http://bugs.php.net/52929 (Closed) Segfault in filter_var with FILTER_VALIDATE_EMAIL with large amount of data Changed paths: U php/php-src/branches/PHP_5_2/NEWS Modified: php/php-src/branches/PHP_5_2/NEWS === --- php/php-src/branches/PHP_5_2/NEWS 2010-10-19 09:56:59 UTC (rev 304507) +++ php/php-src/branches/PHP_5_2/NEWS 2010-10-19 10:16:58 UTC (rev 304508) @@ -4,8 +4,10 @@ - Fixed possible flaw in open_basedir (CVE-2010-3436). (Pierre) - Fixed possible crash in mssql_fetch_batch(). (Kalle) +- Fixed NULL pointer dereference in ZipArchive::getArchiveComment. + (CVE-2010-3709). (Maksymilian Arciemowicz) - Fixed bug #52929 (Segfault in filter_var with FILTER_VALIDATE_EMAIL with - large amount of data). (Adam) + large amount of data). (CVE-2010-3709). (Adam) - Fixed bug #52879 (Objects unreferenced in __get, __set, __isset or __unset can be freed too early). (mail_ben_schmidt at yahoo dot com dot au, Dmitry) - Fixed bug #52772 (var_dump() doesn't check for the existence of -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/gd/libgd/ webpimg.c
pajoye Wed, 06 Oct 2010 09:02:08 + Revision: http://svn.php.net/viewvc?view=revisionrevision=304135 Log: - don't build if no libvpx available Changed paths: U php/php-src/trunk/ext/gd/libgd/webpimg.c Modified: php/php-src/trunk/ext/gd/libgd/webpimg.c === --- php/php-src/trunk/ext/gd/libgd/webpimg.c2010-10-06 07:09:37 UTC (rev 304134) +++ php/php-src/trunk/ext/gd/libgd/webpimg.c2010-10-06 09:02:08 UTC (rev 304135) @@ -30,7 +30,8 @@ * * 6. AdjustColorspaceBack: */ - +#include gd.h +#ifdef HAVE_LIBVPX #include webpimg.h #include math.h @@ -896,3 +897,4 @@ } return webp_failure; } +#endif /* HAVE_LIBVPX */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/TSRM/ tsrm_virtual_cwd.h
pajoye Mon, 04 Oct 2010 10:35:32 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303976 Log: - Fix #52908, fix declaration Bug: http://bugs.php.net/52908 (Closed) Missing data types in function prototype Changed paths: U php/php-src/trunk/TSRM/tsrm_virtual_cwd.h Modified: php/php-src/trunk/TSRM/tsrm_virtual_cwd.h === --- php/php-src/trunk/TSRM/tsrm_virtual_cwd.h 2010-10-04 10:16:12 UTC (rev 303975) +++ php/php-src/trunk/TSRM/tsrm_virtual_cwd.h 2010-10-04 10:35:32 UTC (rev 303976) @@ -133,7 +133,7 @@ CWD_API int php_sys_stat_ex(const char *path, struct stat *buf, int lstat); # define php_sys_stat(path, buf) php_sys_stat_ex(path, buf, 0) # define php_sys_lstat(path, buf) php_sys_stat_ex(path, buf, 1) -CWD_API int php_sys_readlink(link, target, target_len); +CWD_API int php_sys_readlink(const char *link, char *target, size_t target_len); #else # define php_sys_stat stat # define php_sys_lstat lstat -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/gd/ config.m4 config.w32 gd.c gd_ctx.c libgd/gd.h php_gd.h
pajoye Mon, 04 Oct 2010 22:30:35 + Revision: http://svn.php.net/viewvc?view=revisionrevision=304039 Log: - initial webp support, rely on libpx, final version will be either w/o dep or using libwebp (to be released by g) Changed paths: U php/php-src/trunk/ext/gd/config.m4 U php/php-src/trunk/ext/gd/config.w32 U php/php-src/trunk/ext/gd/gd.c U php/php-src/trunk/ext/gd/gd_ctx.c U php/php-src/trunk/ext/gd/libgd/gd.h U php/php-src/trunk/ext/gd/php_gd.h Modified: php/php-src/trunk/ext/gd/config.m4 === --- php/php-src/trunk/ext/gd/config.m4 2010-10-04 21:04:25 UTC (rev 304038) +++ php/php-src/trunk/ext/gd/config.m4 2010-10-04 22:30:35 UTC (rev 304039) @@ -10,6 +10,11 @@ [ --with-gd[=DIR] Include GD support. DIR is the GD library base install directory [BUNDLED]]) +if test -z $PHP_VPX_DIR; then + PHP_ARG_WITH(vpx-dir, for the location of libvpx, + [ --with-vpx-dir[=DIR] GD: Set the path to libvpx install prefix], no, no) +fi + if test -z $PHP_JPEG_DIR; then PHP_ARG_WITH(jpeg-dir, for the location of libjpeg, [ --with-jpeg-dir[=DIR] GD: Set the path to libjpeg install prefix], no, no) @@ -68,6 +73,32 @@ fi ]) +AC_DEFUN([PHP_GD_VPX],[ + if test $PHP_VPX_DIR != no; then + +for i in $PHP_VPX_DIR /usr/local /usr; do + test -f $i/$PHP_VPX_DIR/libvpx.$SHLIB_SUFFIX_NAME || test -f $i/$PHP_LIBDIR/libvpx.a GD_VPX_DIR=$i break +done + +if test -z $GD_VPX_DIR; then + AC_MSG_ERROR([libvpx.(a|so) not found.]) +fi + +PHP_CHECK_LIBRARY(vpx,vpx_codec_destroy, +[ + PHP_ADD_INCLUDE($GD_VPX_DIR/include) + PHP_ADD_LIBRARY(pthread) + PHP_ADD_LIBRARY_WITH_PATH(vpx, $GD_VPX_DIR/$PHP_LIBDIR, GD_SHARED_LIBADD) +],[ + AC_MSG_ERROR([Problem with libvpx.(a|so). Please check config.log for more information.]) +],[ + -L$GD_VPX_DIR/$PHP_LIBDIR +]) + else +AC_MSG_RESULT([If configure fails try --with-vpx-dir=DIR]) + fi +]) + AC_DEFUN([PHP_GD_JPEG],[ if test $PHP_JPEG_DIR != no; then @@ -265,12 +296,12 @@ if test $PHP_GD = yes; then GD_MODULE_TYPE=builtin extra_sources=libgd/gd.c libgd/gd_gd.c libgd/gd_gd2.c libgd/gd_io.c libgd/gd_io_dp.c \ - libgd/gd_io_file.c libgd/gd_ss.c libgd/gd_io_ss.c libgd/gd_png.c libgd/gd_jpeg.c \ - libgd/gdxpm.c libgd/gdfontt.c libgd/gdfonts.c libgd/gdfontmb.c libgd/gdfontl.c \ - libgd/gdfontg.c libgd/gdtables.c libgd/gdft.c libgd/gdcache.c libgd/gdkanji.c \ - libgd/wbmp.c libgd/gd_wbmp.c libgd/gdhelpers.c libgd/gd_topal.c libgd/gd_gif_in.c \ - libgd/xbm.c libgd/gd_gif_out.c libgd/gd_security.c libgd/gd_filter.c \ - libgd/gd_pixelate.c libgd/gd_arc.c libgd/gd_rotate.c libgd/gd_color.c + libgd/gd_io_file.c libgd/gd_ss.c libgd/gd_io_ss.c libgd/webpimg.c libgd/gd_webp.c \ + libgd/gd_png.c libgd/gd_jpeg.c libgd/gdxpm.c libgd/gdfontt.c libgd/gdfonts.c \ + libgd/gdfontmb.c libgd/gdfontl.c libgd/gdfontg.c libgd/gdtables.c libgd/gdft.c \ + libgd/gdcache.c libgd/gdkanji.c libgd/wbmp.c libgd/gd_wbmp.c libgd/gdhelpers.c \ + libgd/gd_topal.c libgd/gd_gif_in.c libgd/xbm.c libgd/gd_gif_out.c libgd/gd_security.c \ + libgd/gd_filter.c libgd/gd_pixelate.c libgd/gd_arc.c libgd/gd_rotate.c libgd/gd_color.c dnl check for fabsf and floorf which are available since C99 AC_CHECK_FUNCS(fabsf floorf) @@ -283,6 +314,7 @@ PHP_GD_TTSTR PHP_GD_JISX0208 PHP_GD_JPEG + PHP_GD_VPX PHP_GD_PNG PHP_GD_XPM PHP_GD_FREETYPE2 @@ -317,6 +349,11 @@ dnl Depending which libraries were included to PHP configure, dnl enable the support in bundled GD library + if test -n $GD_VPX_DIR; then +AC_DEFINE(HAVE_GD_WEBP, 1, [ ]) +GDLIB_CFLAGS=$GDLIB_CFLAGS -DHAVE_LIBVPX + fi + if test -n $GD_JPEG_DIR; then AC_DEFINE(HAVE_GD_JPG, 1, [ ]) GDLIB_CFLAGS=$GDLIB_CFLAGS -DHAVE_LIBJPEG @@ -349,6 +386,7 @@ dnl Various checks for GD features PHP_GD_ZLIB PHP_GD_TTSTR + PHP_GD_VPX PHP_GD_JPEG PHP_GD_PNG PHP_GD_XPM Modified: php/php-src/trunk/ext/gd/config.w32 === --- php/php-src/trunk/ext/gd/config.w32 2010-10-04 21:04:25 UTC (rev 304038) +++ php/php-src/trunk/ext/gd/config.w32 2010-10-04 22:30:35 UTC (rev 304039) @@ -5,7 +5,9 @@ ARG_WITH(t1lib, t1lib support, yes); if (PHP_GD != no) { - if (CHECK_LIB(libjpeg_a.lib;libjpeg.lib, gd, PHP_GD) + if ( + CHECK_LIB(vpxmt.lib, gd, PHP_GD) + CHECK_LIB(libjpeg_a.lib;libjpeg.lib, gd, PHP_GD) CHECK_LIB(freetype_a.lib;freetype.lib, gd, PHP_GD) CHECK_LIB(libpng_a.lib;libpng.lib, gd, PHP_GD) CHECK_HEADER_ADD_INCLUDE(gd.h, CFLAGS_GD, PHP_GD + ;ext\\gd\\libgd) @@ -34,7 +36,7 @@ gdft.c gd_gd2.c gd_gd.c gd_gif_in.c
[PHP-CVS] svn: /php/php-src/trunk/ext/gd/libgd/ webpimg.c webpimg.h
pajoye Mon, 04 Oct 2010 22:33:07 + Revision: http://svn.php.net/viewvc?view=revisionrevision=304040 Log: - initial webp support, rely on libpx, final version will be either w/o dep or using libwebp (to be released by g) Changed paths: A php/php-src/trunk/ext/gd/libgd/webpimg.c A php/php-src/trunk/ext/gd/libgd/webpimg.h Added: php/php-src/trunk/ext/gd/libgd/webpimg.c === --- php/php-src/trunk/ext/gd/libgd/webpimg.c (rev 0) +++ php/php-src/trunk/ext/gd/libgd/webpimg.c 2010-10-04 22:33:07 UTC (rev 304040) @@ -0,0 +1,898 @@ +/*===* + - Copyright 2010 Google Inc. + - + - This code is licensed under the same terms as WebM: + - Software License Agreement: http://www.webmproject.org/license/software/ + - Additional IP Rights Grant: http://www.webmproject.org/license/additional/ + *===*/ + +/* + * Encoding/Decoding of WebP still image compression format. + * + * 1. WebPDecode: Takes an array of bytes (string) corresponding to the WebP + *encoded image and generates output in the YUV format with + *the color components U, V subsampled to 1/2 resolution along + *each dimension. + * + * 2. YUV420toRGBA: Converts from YUV (with color subsampling) such as produced + * by the WebPDecode routine into 32 bits per pixel RGBA data + * array. This data array can be directly used by the Leptonica + * Pix in-memory image format. + * + * 3. WebPEncode: Takes a Y, U, V data buffers (with color components U and V + *subsampled to 1/2 resolution) and generates the WebP string + * + * 4. RGBAToYUV420: Generates Y, U, V data (with color subsampling) from 32 bits + * per pixel RGBA data buffer. The resulting YUV data can be + * directly fed into the WebPEncode routine. + * + * 5. AdjustColorspace: + * + * 6. AdjustColorspaceBack: + */ + +#include webpimg.h + +#include math.h +#include stdio.h +#include stdlib.h +#include string.h +#include sys/stat.h + +#include vpx/vpx_decoder.h +#include vpx/vp8dx.h +#include vpx/vpx_encoder.h +#include vpx/vp8cx.h +#include gd.h + +/*-* + * color conversions * + *-*/ + +#ifndef inline +# define inline __inline +#endif +static inline int clip(float v, int a, int b) { + return (v b) ? b : (v 0) ? 0 : (int)(v); +} +enum { +COLOR_RED = 0, +COLOR_GREEN = 1, +COLOR_BLUE = 2, +ALPHA_CHANNEL = 3 +}; + +/* endian neutral extractions of RGBA from a 32 bit pixel */ +static const uint32 RED_SHIFT = + 8 * (sizeof(uint32) - 1 - COLOR_RED); /* 24 */ +static const uint32 GREEN_SHIFT = + 8 * (sizeof(uint32) - 1 - COLOR_GREEN); /* 16 */ +static const uint32 BLUE_SHIFT = + 8 * (sizeof(uint32) - 1 - COLOR_BLUE); /* 8 */ +static const uint32 ALPHA_SHIFT = + 8 * (sizeof(uint32) - 1 - ALPHA_CHANNEL); /* 0 */ + +static inline int GetRed(const uint32* rgba) { + return gdTrueColorGetRed(*rgba); +} + +static inline int GetGreen(const uint32* rgba) { + return gdTrueColorGetGreen(*rgba); +} + +static inline int GetBlue(const uint32* rgba) { + return gdTrueColorGetBlue(*rgba); +} + +enum { YUV_FRAC = 16 }; + +static inline int clip_uv(int v) { + v = (v + (257 (YUV_FRAC + 2 - 1))) (YUV_FRAC + 2); + return ((v ~0xff) == 0) ? v : v 0 ? 0u : 255u; +} + + +/* YUV - RGB conversions */ +/* The exact naming is Y'CbCr, following the ITU-R BT.601 standard. + * More information at: http://en.wikipedia.org/wiki/YCbCr + */ +static inline int GetLumaY(int r, int g, int b) { + const int kRound = (1 (YUV_FRAC - 1)) + (16 YUV_FRAC); + // Y = 0.2569 * R + 0.5044 * G + 0.0979 * B + 16 + const int luma = 16839 * r + 33059 * g + 6420 * b; + return (luma + kRound) YUV_FRAC; +} + +static inline int GetLumaYfromPtr(uint32* rgba) { + const int r = GetRed(rgba); + const int g = GetGreen(rgba); + const int b = GetBlue(rgba); + return GetLumaY(r, g, b); +} + +static inline int GetChromaU(int r, int g, int b) { + // U = -0.1483 * R - 0.2911 * G + 0.4394 * B + 128 + return clip_uv(-9719 * r - 19081 * g + 28800 * b); +} + +static inline int GetChromaV(int r, int g, int b) { + // V = 0.4394 * R - 0.3679 * G - 0.0715 * B + 128 + return clip_uv(+28800 * r - 24116 * g - 4684 * b); +} + +/* Converts YUV to RGB and writes into a 32 bit pixel in endian + * neutral fashion + */ +enum { RGB_FRAC = 16, RGB_HALF = (1 RGB_FRAC) / 2, + RGB_RANGE_MIN = -227, RGB_RANGE_MAX = 256 + 226 }; + +static int init_done = 0; +static int16_t kVToR[256],
[PHP-CVS] svn: /php/php-src/trunk/ext/gd/libgd/ gd_webp.c
pajoye Mon, 04 Oct 2010 22:34:02 + Revision: http://svn.php.net/viewvc?view=revisionrevision=304041 Log: - missing file for webp Changed paths: A php/php-src/trunk/ext/gd/libgd/gd_webp.c Added: php/php-src/trunk/ext/gd/libgd/gd_webp.c === --- php/php-src/trunk/ext/gd/libgd/gd_webp.c(rev 0) +++ php/php-src/trunk/ext/gd/libgd/gd_webp.c2010-10-04 22:34:02 UTC (rev 304041) @@ -0,0 +1,202 @@ +#include stdio.h +#include math.h +#include string.h +#include stdlib.h +#include gd.h + + +#ifdef HAVE_LIBVPX +#include webpimg.h +#include gdhelpers.h + +extern void gd_YUV420toRGBA(uint8* Y, + uint8* U, + uint8* V, + gdImagePtr im); + +extern void gd_RGBAToYUV420(gdImagePtr im2, + uint8* Y, + uint8* U, + uint8* V); + +const char * gdWebpGetVersionString() +{ + return not defined; +} + +gdImagePtr gdImageCreateFromWebp (FILE * inFile) +{ + gdImagePtr im; + gdIOCtx *in = gdNewFileCtx(inFile); + im = gdImageCreateFromWebpCtx(in); + in-gd_free(in); + + return im; +} + +gdImagePtr gdImageCreateFromWebpPtr (int size, void *data) +{ + intwidth, height, ret; + unsigned char *Y = NULL; + unsigned char *U = NULL; + unsigned char *V = NULL; + gdImagePtr im; + + ret = WebPDecode(data, size, Y, U, V, width, height); + if (ret != webp_success) { + if (Y) free(Y); + if (U) free(U); + if (V) free(V); + php_gd_error(WebP decode: fail to decode input data); + return NULL; + } + im = gdImageCreateTrueColor(width, height); + if (!im) { + return NULL; + } + gd_YUV420toRGBA(Y, U, V, im); + return im; +} + +gdImagePtr gdImageCreateFromWebpCtx (gdIOCtx * infile) +{ + intwidth, height, ret; + unsigned char *filedata; + unsigned char dummy[1024]; + unsigned char *Y = NULL; + unsigned char *U = NULL; + unsigned char *V = NULL; + size_t size = 0, n; + gdImagePtr im; + + do { + n = gdGetBuf(dummy, 1024, infile); + printf(%i\n, n); + size += n; + } while (n != EOF); + + filedata = gdMalloc(size); + if (!filedata) { + php_gd_error(WebP decode: alloc failed); + return NULL; + } + gdGetBuf(filedata, size, infile); + ret = WebPDecode(filedata, size, Y, U, V, width, height); + gdFree(filedata); + if (ret != webp_success) { + if (Y) free(Y); + if (U) free(U); + if (V) free(V); + php_gd_error(WebP decode: fail to decode input data); + return NULL; + } + im = gdImageCreateTrueColor(width, height); + gd_YUV420toRGBA(Y, U, V, im); + return im; +} + +void gdImageWebpEx (gdImagePtr im, FILE * outFile, int quantization) +{ + gdIOCtx *out = gdNewFileCtx(outFile); + gdImageWebpCtx(im, out, quantization); + out-gd_free(out); +} + +void gdImageWebp (gdImagePtr im, FILE * outFile) +{ + gdIOCtx *out = gdNewFileCtx(outFile); + gdImageWebpCtx(im, out, -1); + out-gd_free(out); +} + +void * gdImageWebpPtr (gdImagePtr im, int *size) +{ + void *rv; + gdIOCtx *out = gdNewDynamicCtx(2048, NULL); + gdImageWebpCtx(im, out, -1); + rv = gdDPExtractData(out, size); + out-gd_free(out); + + return rv; +} + +void * gdImageWebpPtrEx (gdImagePtr im, int *size, int quantization) +{ + void *rv; + gdIOCtx *out = gdNewDynamicCtx(2048, NULL); + gdImageWebpCtx(im, out, quantization); + rv = gdDPExtractData(out, size); + out-gd_free(out); + return rv; +} + +/* + * Maps normalized QP (quality) to VP8 QP + */ +int mapQualityToVP8QP(int quality) { +#define MIN_QUALITY 0 +#define MAX_QUALITY 100 +#define MIN_VP8QP 1 +#define MAX_VP8QP 63 + const float scale = MAX_VP8QP - MIN_VP8QP; + const float vp8qp = + scale * (MAX_QUALITY - quality) / (MAX_QUALITY - MIN_QUALITY) + MIN_VP8QP; + if (quality MIN_QUALITY || quality MAX_QUALITY) { + php_gd_error(Wrong quality value %d., quality); + return -1; + } + + return (int)(vp8qp + 0.5); +} + +/* This routine is based in part on code from Dale Lutz (Safe Software Inc.) + * and in part on demo code from Chapter 15 of PNG: The Definitive Guide + * (http://www.cdrom.com/pub/png/pngbook.html). + */ +void gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quantization) +{ + int width = im-sx; + int height = im-sy; + int colors = im-colorsTotal; + int *open = im-open; + + int yuv_width, yuv_height, yuv_nbytes, ret; + int
Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/standard/basic_functions.c
On Fri, Oct 1, 2010 at 11:18 AM, Kalle Sommer Nielsen ka...@php.net wrote: kalle Fri, 01 Oct 2010 09:18:44 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303912 Log: * Added PHP_RAND_MAX and PHP_MT_RAND_MAX constants * Deprecated getrandmax() and mt_getrandmax() in favour of the new constants What is the reasoning behind that? It could be possible that the max/min has to be defined at runtime at some point. Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING ext/standard/basic_functions.c
On Fri, Oct 1, 2010 at 12:08 PM, Kalle Sommer Nielsen ka...@php.net wrote: What is the reasoning behind that? It could be possible that the max/min has to be defined at runtime at some point. Define at runtime? 'possible', 'at some point' (new RNG implementation). In any case, I don't see any gain to deprecate them for the sake of adding constants. Please revert the deprecation, I'm sure about the constant additions as they could be useless later (same reason). Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /SVNROOT/ global_avail
pajoye Wed, 29 Sep 2010 18:13:32 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303877 Log: - give Gustavo karma for php-srcco Changed paths: U SVNROOT/global_avail Modified: SVNROOT/global_avail === --- SVNROOT/global_avail2010-09-29 16:53:17 UTC (rev 303876) +++ SVNROOT/global_avail2010-09-29 18:13:32 UTC (rev 303877) @@ -16,7 +16,7 @@ # The PHP Developers have full access to the full source trees for # PHP, as well as the documentation. -avail|patrickallaert,mgdm,pierrick,ilewis,mkoppanen,lstrojny,dharmap,kraghuba,stevseea,colder,lwe,auroraeosrose,mike,rolland,cawa,msisolak,alan_k,rrichards,tal,mfischer,fmk,hirokawa,jah,eschmid,dbeu,sebastian,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,jani,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,entity,cardinal,coar,jflemer,raphael,danda,rbb,mboeren,dougm,edink,alexwaugh,bernd,zak,sesser,yohgaki,imajes,markonen,dickmeiss,helly,sander,jan,kir,aaron,jwoolley,pbannister,rvenkat,dali,rodif_bl,hyanantha,witten,georg,msopacua,mpdoremus,fujimoto,iliaa,chregu,azzit,gschlossnagle,andrey,dan,moriyoshi,dviner,bfrance,flex,iwakiri,john,harrie,pollita,ianh,k.schroeder,dcowgill,jerenkrantz,jay,ddhill,jorton,thetaphi,abies,vincent,goba,dmitry,pajoye,shie,rafi,magnus,! tony2001,johannes,dbs,skoduru,nrathna,jesus,gopalv,bjori,nlopess,wrowe,shire,zoe,scottmac,t2man,dsp,davidw,ab5602,nicholsr,lsmith,cellog,davidc,felipe,robinf,jmessa,philip,sixd,gwynne,ant,kalle,mattwil,sfox,hnangelo,ohill,indeyets,felixdv,mich4ld,lbarnaud,cseiler,sean,dkelsey,tabe,ericstewart,mbeccati,sebs,garretts,guenter,srinatar,basantk,geissert,salathe,aharvey,mj,gron,uw,fat|php/php-src,pecl,phpdoc,phd,web/doc,web/doc-editor +avail|patrickallaert,mgdm,pierrick,ilewis,mkoppanen,lstrojny,dharmap,kraghuba,stevseea,colder,lwe,auroraeosrose,mike,rolland,cawa,msisolak,alan_k,rrichards,tal,mfischer,fmk,hirokawa,jah,eschmid,dbeu,sebastian,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,jani,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,entity,cardinal,coar,jflemer,raphael,danda,rbb,mboeren,dougm,edink,alexwaugh,bernd,zak,sesser,yohgaki,imajes,markonen,dickmeiss,helly,sander,jan,kir,aaron,jwoolley,pbannister,rvenkat,dali,rodif_bl,hyanantha,witten,georg,msopacua,mpdoremus,fujimoto,iliaa,chregu,azzit,gschlossnagle,andrey,dan,moriyoshi,dviner,bfrance,flex,iwakiri,john,harrie,pollita,ianh,k.schroeder,dcowgill,jerenkrantz,jay,ddhill,jorton,thetaphi,abies,vincent,goba,dmitry,pajoye,shie,rafi,magnus,! tony2001,johannes,dbs,skoduru,nrathna,jesus,gopalv,bjori,nlopess,wrowe,shire,zoe,scottmac,t2man,dsp,davidw,ab5602,nicholsr,lsmith,cellog,davidc,felipe,robinf,jmessa,philip,sixd,gwynne,ant,kalle,mattwil,sfox,hnangelo,ohill,indeyets,felixdv,mich4ld,lbarnaud,cseiler,sean,dkelsey,tabe,ericstewart,mbeccati,sebs,garretts,guenter,srinatar,basantk,geissert,salathe,aharvey,mj,gron,uw,fat,cataphract|php/php-src,pecl,phpdoc,phd,web/doc,web/doc-editor # Engine karma is further restricted (this line MUST come after lines granting # php-src karma and before lines granting Zend/TSRM karma) @@ -316,7 +316,6 @@ avail|iekpo|pecl/solr,phpdoc avail|ruslany,ksingla,donraman|pecl/wincache,phpdoc avail|pierrick|pecl/stomp,phpdoc,php/php-src/branches/LEMON -avail|cataphract|pecl/rar,phpdoc avail|cyberspice|pecl/dio,pecl/framegrab,phpdoc avail|crodas|pecl/textcat,phpdoc avail|dmendolia,patrickallaert,dragoonis|pecl/apm,phpdoc -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/main/fopen_wrappers.c trunk/main/fopen_wrappers.c
pajoye Tue, 28 Sep 2010 13:29:33 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303824 Log: - Fixed possible flaw in open_basedir (CVE-2010-3436) Changed paths: U php/php-src/branches/PHP_5_3/main/fopen_wrappers.c U php/php-src/trunk/main/fopen_wrappers.c Modified: php/php-src/branches/PHP_5_3/main/fopen_wrappers.c === --- php/php-src/branches/PHP_5_3/main/fopen_wrappers.c 2010-09-28 13:28:55 UTC (rev 303823) +++ php/php-src/branches/PHP_5_3/main/fopen_wrappers.c 2010-09-28 13:29:33 UTC (rev 303824) @@ -250,8 +250,13 @@ #else if (strncmp(resolved_basedir, resolved_name, resolved_basedir_len) == 0) { #endif - /* File is in the right directory */ - return 0; + if (resolved_name_len resolved_basedir_len + resolved_name[resolved_basedir_len] != PHP_DIR_SEPARATOR) { + return -1; + } else { + /* File is in the right directory */ + return 0; + } } else { /* /openbasedir/ and /openbasedir are the same directory */ if (resolved_basedir_len == (resolved_name_len + 1) resolved_basedir[resolved_basedir_len - 1] == PHP_DIR_SEPARATOR) { Modified: php/php-src/trunk/main/fopen_wrappers.c === --- php/php-src/trunk/main/fopen_wrappers.c 2010-09-28 13:28:55 UTC (rev 303823) +++ php/php-src/trunk/main/fopen_wrappers.c 2010-09-28 13:29:33 UTC (rev 303824) @@ -249,8 +249,13 @@ #else if (strncmp(resolved_basedir, resolved_name, resolved_basedir_len) == 0) { #endif - /* File is in the right directory */ - return 0; + if (resolved_name_len resolved_basedir_len + resolved_name[resolved_basedir_len] != PHP_DIR_SEPARATOR) { + return -1; + } else { + /* File is in the right directory */ + return 0; + } } else { /* /openbasedir/ and /openbasedir are the same directory */ if (resolved_basedir_len == (resolved_name_len + 1) resolved_basedir[resolved_basedir_len - 1] == PHP_DIR_SEPARATOR) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_2/ NEWS
pajoye Tue, 28 Sep 2010 13:30:20 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303825 Log: - Fixed possible flaw in open_basedir (CVE-2010-3436) Changed paths: U php/php-src/branches/PHP_5_2/NEWS Modified: php/php-src/branches/PHP_5_2/NEWS === --- php/php-src/branches/PHP_5_2/NEWS 2010-09-28 13:29:33 UTC (rev 303824) +++ php/php-src/branches/PHP_5_2/NEWS 2010-09-28 13:30:20 UTC (rev 303825) @@ -1,6 +1,7 @@ PHP NEWS ||| ?? ??? 2010, PHP 5.2.15 +- Fixed possible flaw in open_basedir (CVE-2010-3436). (Pierre) - Fixed possible crash in mssql_fetch_batch(). (Kalle) - Fixed bug #52772 (var_dump() doesn't check for the existence of -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS
pajoye Tue, 28 Sep 2010 13:30:30 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303826 Log: - Fixed possible flaw in open_basedir (CVE-2010-3436) Changed paths: U php/php-src/branches/PHP_5_3/NEWS Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-09-28 13:30:20 UTC (rev 303825) +++ php/php-src/branches/PHP_5_3/NEWS 2010-09-28 13:30:30 UTC (rev 303826) @@ -13,8 +13,9 @@ - Implemented symbolic links support for open_basedir checks. (Pierre) - Implemented FR #51804, SplFileInfo::getLinkTarget on Windows. (Pierre) +- Fixed possible flaw in open_basedir (CVE-2010-3436). (Pierre) +- Fixed MOPS-2010-24, fix string validation. (CVE-2010-2950). (Pierre) - Fixed symbolic resolution support when the target is a DFS share. (Pierre) -- Fixed MOPS-2010-24, fix string validation. (CVE-2010-2950). (Pierre) - Changed deprecated ini options on startup from E_WARNING to E_DEPRECATED. (Kalle) - Changed the $context parameter on copy() to actually have an effect. (Kalle) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/zlib/zlib_fopen_wrapper.c trunk/ext/zlib/zlib_fopen_wrapper.c
pajoye Sun, 26 Sep 2010 20:46:54 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303772 Log: - fix bug #52926, zlib fopen wrapper does not use the context Bug: http://bugs.php.net/52926 (Analyzed) stream_context_set_default() does not work as intended with stream chaining Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/zlib/zlib_fopen_wrapper.c U php/php-src/trunk/ext/zlib/zlib_fopen_wrapper.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-09-26 20:16:25 UTC (rev 303771) +++ php/php-src/branches/PHP_5_3/NEWS 2010-09-26 20:46:54 UTC (rev 303772) @@ -21,6 +21,7 @@ - Fixed possible crash in mssql_fetch_batch(). (Kalle) - Fixed inconsistent backlog default value (-1) in FPM on many systems. (fat) +- Fixed bug #52926 (zlib fopen wrapper does not use context). (Gustavo) - Fixed bug #52891 (Wrong data inserted with mysqli/mysqlnd when using mysqli_stmt_bind_param and value PHP_INT_MAX). (Andrey) - Fixed bug #52849 (GNU MP invalid version match). (Adam) Modified: php/php-src/branches/PHP_5_3/ext/zlib/zlib_fopen_wrapper.c === --- php/php-src/branches/PHP_5_3/ext/zlib/zlib_fopen_wrapper.c 2010-09-26 20:16:25 UTC (rev 303771) +++ php/php-src/branches/PHP_5_3/ext/zlib/zlib_fopen_wrapper.c 2010-09-26 20:46:54 UTC (rev 303772) @@ -128,7 +128,7 @@ path += 5; } - innerstream = php_stream_open_wrapper(path, mode, STREAM_MUST_SEEK | options | STREAM_WILL_CAST, opened_path); + innerstream = php_stream_open_wrapper_ex(path, mode, STREAM_MUST_SEEK | options | STREAM_WILL_CAST, opened_path, context); if (innerstream) { int fd; Modified: php/php-src/trunk/ext/zlib/zlib_fopen_wrapper.c === --- php/php-src/trunk/ext/zlib/zlib_fopen_wrapper.c 2010-09-26 20:16:25 UTC (rev 303771) +++ php/php-src/trunk/ext/zlib/zlib_fopen_wrapper.c 2010-09-26 20:46:54 UTC (rev 303772) @@ -128,7 +128,7 @@ path += 5; } - innerstream = php_stream_open_wrapper(path, mode, STREAM_MUST_SEEK | options | STREAM_WILL_CAST, opened_path); + innerstream = php_stream_open_wrapper_ex(path, mode, STREAM_MUST_SEEK | options | STREAM_WILL_CAST, opened_path, context); if (innerstream) { int fd; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/TSRM/ tsrm_virtual_cwd.h
pajoye Wed, 22 Sep 2010 21:28:37 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303693 Log: - Fix #52908, fix declaration Bug: http://bugs.php.net/52908 (Open) Missing data types in function prototype Changed paths: U php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h Modified: php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h === --- php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h2010-09-22 21:22:40 UTC (rev 303692) +++ php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h2010-09-22 21:28:37 UTC (rev 303693) @@ -133,7 +133,7 @@ CWD_API int php_sys_stat_ex(const char *path, struct stat *buf, int lstat); # define php_sys_stat(path, buf) php_sys_stat_ex(path, buf, 0) # define php_sys_lstat(path, buf) php_sys_stat_ex(path, buf, 1) -CWD_API int php_sys_readlink(link, target, target_len); +CWD_API int php_sys_readlink(const char *link, char *target, size_t target_len); #else # define php_sys_stat stat # define php_sys_lstat lstat -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/standard/ link_win32.c
pajoye Sat, 18 Sep 2010 14:54:40 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303500 Log: - not needed here anymore Changed paths: U php/php-src/branches/PHP_5_3/ext/standard/link_win32.c Modified: php/php-src/branches/PHP_5_3/ext/standard/link_win32.c === --- php/php-src/branches/PHP_5_3/ext/standard/link_win32.c 2010-09-18 13:43:07 UTC (rev 303499) +++ php/php-src/branches/PHP_5_3/ext/standard/link_win32.c 2010-09-18 14:54:40 UTC (rev 303500) @@ -51,14 +51,6 @@ - this file is then useless and we have a portable link API */ -#ifndef VOLUME_NAME_NT -#define VOLUME_NAME_NT 0x2 -#endif - -#ifndef VOLUME_NAME_DOS -#define VOLUME_NAME_DOS 0x0 -#endif - /* {{{ proto string readlink(string filename) Return the target of a symbolic link */ PHP_FUNCTION(readlink) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/main/ SAPI.c SAPI.h php_content_types.c
pajoye Fri, 17 Sep 2010 08:41:05 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303453 Log: - drop TSRMLS_FETCH in sapi_register_* (won't bring much at runtime :) ) and cleanup/group the upgrade guide, no need of twenty titles for the same change Changed paths: U php/php-src/trunk/main/SAPI.c U php/php-src/trunk/main/SAPI.h U php/php-src/trunk/main/php_content_types.c Modified: php/php-src/trunk/main/SAPI.c === --- php/php-src/trunk/main/SAPI.c 2010-09-17 08:17:43 UTC (rev 303452) +++ php/php-src/trunk/main/SAPI.c 2010-09-17 08:41:05 UTC (rev 303453) @@ -850,9 +850,8 @@ } -SAPI_API int sapi_register_default_post_reader(void (*default_post_reader)(TSRMLS_D)) +SAPI_API int sapi_register_default_post_reader(void (*default_post_reader)(TSRMLS_D) TSRMLS_DC) { - TSRMLS_FETCH(); if (SG(sapi_started) EG(in_execution)) { return FAILURE; } @@ -861,9 +860,8 @@ } -SAPI_API int sapi_register_treat_data(void (*treat_data)(int arg, char *str, zval *destArray TSRMLS_DC)) +SAPI_API int sapi_register_treat_data(void (*treat_data)(int arg, char *str, zval *destArray TSRMLS_DC) TSRMLS_DC) { - TSRMLS_FETCH(); if (SG(sapi_started) EG(in_execution)) { return FAILURE; } @@ -871,9 +869,8 @@ return SUCCESS; } -SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, char *var, char **val, unsigned int val_len, unsigned int *new_val_len TSRMLS_DC), unsigned int (*input_filter_init)(TSRMLS_D)) +SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, char *var, char **val, unsigned int val_len, unsigned int *new_val_len TSRMLS_DC), unsigned int (*input_filter_init)(TSRMLS_D) TSRMLS_DC) { - TSRMLS_FETCH(); if (SG(sapi_started) EG(in_execution)) { return FAILURE; } Modified: php/php-src/trunk/main/SAPI.h === --- php/php-src/trunk/main/SAPI.h 2010-09-17 08:17:43 UTC (rev 303452) +++ php/php-src/trunk/main/SAPI.h 2010-09-17 08:41:05 UTC (rev 303453) @@ -190,9 +190,9 @@ SAPI_API int sapi_register_post_entries(sapi_post_entry *post_entry TSRMLS_DC); SAPI_API int sapi_register_post_entry(sapi_post_entry *post_entry TSRMLS_DC); SAPI_API void sapi_unregister_post_entry(sapi_post_entry *post_entry TSRMLS_DC); -SAPI_API int sapi_register_default_post_reader(void (*default_post_reader)(TSRMLS_D)); -SAPI_API int sapi_register_treat_data(void (*treat_data)(int arg, char *str, zval *destArray TSRMLS_DC)); -SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, char *var, char **val, unsigned int val_len, unsigned int *new_val_len TSRMLS_DC), unsigned int (*input_filter_init)(TSRMLS_D)); +SAPI_API int sapi_register_default_post_reader(void (*default_post_reader)(TSRMLS_D) TSRMLS_DC); +SAPI_API int sapi_register_treat_data(void (*treat_data)(int arg, char *str, zval *destArray TSRMLS_DC) TSRMLS_DC); +SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, char *var, char **val, unsigned int val_len, unsigned int *new_val_len TSRMLS_DC), unsigned int (*input_filter_init)(TSRMLS_D) TSRMLS_DC); SAPI_API int sapi_flush(TSRMLS_D); SAPI_API struct stat *sapi_get_stat(TSRMLS_D); Modified: php/php-src/trunk/main/php_content_types.c === --- php/php-src/trunk/main/php_content_types.c 2010-09-17 08:17:43 UTC (rev 303452) +++ php/php-src/trunk/main/php_content_types.c 2010-09-17 08:41:05 UTC (rev 303453) @@ -73,9 +73,9 @@ */ int php_startup_sapi_content_types(TSRMLS_D) { - sapi_register_default_post_reader(php_default_post_reader); - sapi_register_treat_data(php_default_treat_data); - sapi_register_input_filter(php_default_input_filter, NULL); + sapi_register_default_post_reader(php_default_post_reader TSRMLS_CC); + sapi_register_treat_data(php_default_treat_data TSRMLS_CC); + sapi_register_input_filter(php_default_input_filter, NULL TSRMLS_CC); return SUCCESS; } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ UPGRADING.INTERNALS
pajoye Fri, 17 Sep 2010 08:42:12 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303454 Log: - drop TSRMLS_FETCH in sapi_register_* (won't bring much at runtime :) ) and cleanup/group the upgrade guide, no need of twenty titles for the same change Changed paths: U php/php-src/trunk/UPGRADING.INTERNALS Modified: php/php-src/trunk/UPGRADING.INTERNALS === --- php/php-src/trunk/UPGRADING.INTERNALS 2010-09-17 08:41:05 UTC (rev 303453) +++ php/php-src/trunk/UPGRADING.INTERNALS 2010-09-17 08:42:12 UTC (rev 303454) @@ -8,6 +8,8 @@ c. readlink support d. layout of some core ZE structures (zend_op_array, zend_class_entry, ...) e. Zend\zend_fast_cache.h has been removed + f. API Signature changes + 1. Internal API changes @@ -66,32 +68,26 @@ Use emalloc, emalloc_rel, efree or efree_rel instead. - f. zend_list_insert -zend_list_insert uses now TSRMLS_DC: + f. API Signature changes +. zend_list_insert + ZEND_API int zend_list_insert(void *ptr, int type TSRMLS_DC); + call: zend_list_insert(a, SOMETYPE TSRMLS_CC); + NB: If zend_list_insert is used to register a resource, + ZEND_REGISTER_RESOURCE could be used instead. -ZEND_API int zend_list_insert(void *ptr, int type TSRMLS_DC); +. php_le_stream_context(TSRMLS_C) + PHPAPI php_stream_context *php_stream_context_alloc(TSRMLS_D) + call: context = php_stream_context_alloc(TSRMLS_C); -it has to be called using: +. php_stream_context_alloc + PHPAPI php_stream_context *php_stream_context_alloc(TSRMLS_D); + call: context = php_stream_context_alloc(TSRMLS_C); +. sapi_register_default_post_reader + SAPI_API int sapi_register_default_post_reader(void (*default_post_reader)(TSRMLS_D) TSRMLS_DC); -zend_list_insert(a, SOMETYPE TSRMLS_CC); +. sapi_register_treat_data + SAPI_API int sapi_register_treat_data(void (*treat_data)(int arg, char *str, zval *destArray TSRMLS_DC) TSRMLS_DC); -If zend_list_insert is used to register a resource, ZEND_REGISTER_RESOURCE -could be used instead. - - g. php_le_stream_context(TSRMLS_C) -php_le_stream_context uses now TSRMLS_D: - -PHPAPI php_stream_context *php_stream_context_alloc(TSRMLS_D) - -it has to be called using: - -context = php_stream_context_alloc(TSRMLS_C); - - h. php_stream_context_alloc -php_stream_context_alloc uses now TSRMLS_D: - -PHPAPI php_stream_context *php_stream_context_alloc(TSRMLS_D); - -it has to be called using: - -context = php_stream_context_alloc(TSRMLS_C); +. sapi_register_input_filter + SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, char *var, char **val, unsigned int val_len, unsigned int *new_val_len TSRMLS_DC), unsigned int (*input_filter_init)(TSRMLS_D) TSRMLS_DC); + -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ TSRM/tsrm_virtual_cwd.c TSRM/tsrm_virtual_cwd.h TSRM/tsrm_win32.c TSRM/tsrm_win32.h UPGRADING.INTERNALS
pajoye Fri, 17 Sep 2010 09:27:19 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303455 Log: - drop tsrmls_fetch in tsrm_win32_access Changed paths: U php/php-src/trunk/TSRM/tsrm_virtual_cwd.c U php/php-src/trunk/TSRM/tsrm_virtual_cwd.h U php/php-src/trunk/TSRM/tsrm_win32.c U php/php-src/trunk/TSRM/tsrm_win32.h U php/php-src/trunk/UPGRADING.INTERNALS Modified: php/php-src/trunk/TSRM/tsrm_virtual_cwd.c === --- php/php-src/trunk/TSRM/tsrm_virtual_cwd.c 2010-09-17 08:42:12 UTC (rev 303454) +++ php/php-src/trunk/TSRM/tsrm_virtual_cwd.c 2010-09-17 09:27:19 UTC (rev 303455) @@ -1433,7 +1433,7 @@ } #if defined(TSRM_WIN32) - ret = tsrm_win32_access(new_state.cwd, mode); + ret = tsrm_win32_access(new_state.cwd, mode TSRMLS_CC); #else ret = access(new_state.cwd, mode); #endif Modified: php/php-src/trunk/TSRM/tsrm_virtual_cwd.h === --- php/php-src/trunk/TSRM/tsrm_virtual_cwd.h 2010-09-17 08:42:12 UTC (rev 303454) +++ php/php-src/trunk/TSRM/tsrm_virtual_cwd.h 2010-09-17 09:27:19 UTC (rev 303455) @@ -310,7 +310,7 @@ #define VCWD_OPENDIR(pathname) opendir(pathname) #define VCWD_POPEN(command, type) popen(command, type) #if defined(TSRM_WIN32) -#define VCWD_ACCESS(pathname, mode) tsrm_win32_access(pathname, mode) +#define VCWD_ACCESS(pathname, mode) tsrm_win32_access(pathname, mode TSRMLS_CC) #else #define VCWD_ACCESS(pathname, mode) access(pathname, mode) #endif Modified: php/php-src/trunk/TSRM/tsrm_win32.c === --- php/php-src/trunk/TSRM/tsrm_win32.c 2010-09-17 08:42:12 UTC (rev 303454) +++ php/php-src/trunk/TSRM/tsrm_win32.c 2010-09-17 09:27:19 UTC (rev 303455) @@ -190,7 +190,7 @@ return NULL; } -TSRM_API int tsrm_win32_access(const char *pathname, int mode) +TSRM_API int tsrm_win32_access(const char *pathname, int mode TSRMLS_DC) { time_t t; HANDLE thread_token; @@ -208,8 +208,6 @@ realpath_cache_bucket * bucket = NULL; char * real_path = NULL; - TSRMLS_FETCH(); - if (mode == 1 /*X_OK*/) { DWORD type; return GetBinaryType(pathname, type) ? 0 : -1; Modified: php/php-src/trunk/TSRM/tsrm_win32.h === --- php/php-src/trunk/TSRM/tsrm_win32.h 2010-09-17 08:42:12 UTC (rev 303454) +++ php/php-src/trunk/TSRM/tsrm_win32.h 2010-09-17 09:27:19 UTC (rev 303455) @@ -98,7 +98,7 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env); TSRM_API FILE *popen(const char *command, const char *type); TSRM_API int pclose(FILE *stream); -TSRM_API int tsrm_win32_access(const char *pathname, int mode); +TSRM_API int tsrm_win32_access(const char *pathname, int mode TSRMLS_DC); TSRM_API int win32_utime(const char *filename, struct utimbuf *buf); TSRM_API int shmget(int key, int size, int flags); Modified: php/php-src/trunk/UPGRADING.INTERNALS === --- php/php-src/trunk/UPGRADING.INTERNALS 2010-09-17 08:42:12 UTC (rev 303454) +++ php/php-src/trunk/UPGRADING.INTERNALS 2010-09-17 09:27:19 UTC (rev 303455) @@ -91,3 +91,5 @@ . sapi_register_input_filter SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, char *var, char **val, unsigned int val_len, unsigned int *new_val_len TSRMLS_DC), unsigned int (*input_filter_init)(TSRMLS_D) TSRMLS_DC); +. tsrm_win32_access + TSRM_API int tsrm_win32_access(const char *pathname, int mode TSRMLS_DC); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ TSRM/tsrm_virtual_cwd.c TSRM/tsrm_win32.c TSRM/tsrm_win32.h UPGRADING.INTERNALS
pajoye Fri, 17 Sep 2010 10:00:01 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303456 Log: - drop tsrmls_fetch in popen_ex Changed paths: U php/php-src/trunk/TSRM/tsrm_virtual_cwd.c U php/php-src/trunk/TSRM/tsrm_win32.c U php/php-src/trunk/TSRM/tsrm_win32.h U php/php-src/trunk/UPGRADING.INTERNALS Modified: php/php-src/trunk/TSRM/tsrm_virtual_cwd.c === --- php/php-src/trunk/TSRM/tsrm_virtual_cwd.c 2010-09-17 09:27:19 UTC (rev 303455) +++ php/php-src/trunk/TSRM/tsrm_virtual_cwd.c 2010-09-17 10:00:01 UTC (rev 303456) @@ -1764,7 +1764,7 @@ #ifdef TSRM_WIN32 CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC) /* {{{ */ { - return popen_ex(command, type, CWDG(cwd).cwd, NULL); + return popen_ex(command, type, CWDG(cwd).cwd, NULL TSRMLS_CC); } /* }}} */ #elif defined(NETWARE) Modified: php/php-src/trunk/TSRM/tsrm_win32.c === --- php/php-src/trunk/TSRM/tsrm_win32.c 2010-09-17 09:27:19 UTC (rev 303455) +++ php/php-src/trunk/TSRM/tsrm_win32.c 2010-09-17 10:00:01 UTC (rev 303456) @@ -446,10 +446,12 @@ TSRM_API FILE *popen(const char *command, const char *type) { - return popen_ex(command, type, NULL, NULL); + TSRMLS_FETCH(); + + return popen_ex(command, type, NULL, NULL TSRMLS_CC); } -TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env) +TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env TSRMLS_DC) { FILE *stream = NULL; int fno, type_len = strlen(type), read, mode; @@ -467,8 +469,6 @@ HANDLE token_user = NULL; BOOL asuser = TRUE; - TSRMLS_FETCH(); - if (!type) { return NULL; } Modified: php/php-src/trunk/TSRM/tsrm_win32.h === --- php/php-src/trunk/TSRM/tsrm_win32.h 2010-09-17 09:27:19 UTC (rev 303455) +++ php/php-src/trunk/TSRM/tsrm_win32.h 2010-09-17 10:00:01 UTC (rev 303456) @@ -95,7 +95,7 @@ TSRM_API void tsrm_win32_startup(void); TSRM_API void tsrm_win32_shutdown(void); -TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env); +TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env TSRMLS_DC); TSRM_API FILE *popen(const char *command, const char *type); TSRM_API int pclose(FILE *stream); TSRM_API int tsrm_win32_access(const char *pathname, int mode TSRMLS_DC); Modified: php/php-src/trunk/UPGRADING.INTERNALS === --- php/php-src/trunk/UPGRADING.INTERNALS 2010-09-17 09:27:19 UTC (rev 303455) +++ php/php-src/trunk/UPGRADING.INTERNALS 2010-09-17 10:00:01 UTC (rev 303456) @@ -93,3 +93,6 @@ . tsrm_win32_access TSRM_API int tsrm_win32_access(const char *pathname, int mode TSRMLS_DC); + +. popen_ex (win32) + TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env TSRMLS_DC); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/standard/ mail.c
pajoye Fri, 17 Sep 2010 10:04:28 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303457 Log: - use popen_ex directly, avoid the tsrm fetch Changed paths: U php/php-src/trunk/ext/standard/mail.c Modified: php/php-src/trunk/ext/standard/mail.c === --- php/php-src/trunk/ext/standard/mail.c 2010-09-17 10:00:01 UTC (rev 303456) +++ php/php-src/trunk/ext/standard/mail.c 2010-09-17 10:04:28 UTC (rev 303457) @@ -280,7 +280,7 @@ #endif #ifdef PHP_WIN32 - sendmail = popen(sendmail_cmd, wb); + sendmail = popen_ex(sendmail_cmd, wb, NULL, NULL TSRMLS_CC); #else /* Since popen() doesn't indicate if the internal fork() doesn't work * (e.g. the shell can't be executed) we explicitely set it to 0 to be -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/filter/ filter.c
pajoye Fri, 17 Sep 2010 10:51:53 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303460 Log: - fix ts build (zend_list_insert change) Changed paths: U php/php-src/trunk/ext/filter/filter.c Modified: php/php-src/trunk/ext/filter/filter.c === --- php/php-src/trunk/ext/filter/filter.c 2010-09-17 10:14:39 UTC (rev 303459) +++ php/php-src/trunk/ext/filter/filter.c 2010-09-17 10:51:53 UTC (rev 303460) @@ -274,7 +274,7 @@ REGISTER_LONG_CONSTANT(FILTER_FLAG_NO_RES_RANGE, FILTER_FLAG_NO_RES_RANGE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(FILTER_FLAG_NO_PRIV_RANGE, FILTER_FLAG_NO_PRIV_RANGE, CONST_CS | CONST_PERSISTENT); - sapi_register_input_filter(php_sapi_filter, php_sapi_filter_init); + sapi_register_input_filter(php_sapi_filter, php_sapi_filter_init TSRMLS_CC); return SUCCESS; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c trunk/TSRM/tsrm_virtual_cwd.c
pajoye Fri, 17 Sep 2010 11:34:49 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303461 Log: - restore VOLUME_NAME_NT and VOLUME_NAME_DOS definition, thx Andrey for the headup Changed paths: U php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c U php/php-src/trunk/TSRM/tsrm_virtual_cwd.c Modified: php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c === --- php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c2010-09-17 10:51:53 UTC (rev 303460) +++ php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c2010-09-17 11:34:49 UTC (rev 303461) @@ -39,6 +39,14 @@ # ifndef IO_REPARSE_TAG_SYMLINK # define IO_REPARSE_TAG_SYMLINK 0xA00C # endif + +# ifndef VOLUME_NAME_NT +# define VOLUME_NAME_NT 0x2 +# endif + +# ifndef VOLUME_NAME_DOS +# define VOLUME_NAME_DOS 0x0 +# endif #endif #ifndef S_IFLNK Modified: php/php-src/trunk/TSRM/tsrm_virtual_cwd.c === --- php/php-src/trunk/TSRM/tsrm_virtual_cwd.c 2010-09-17 10:51:53 UTC (rev 303460) +++ php/php-src/trunk/TSRM/tsrm_virtual_cwd.c 2010-09-17 11:34:49 UTC (rev 303461) @@ -39,6 +39,14 @@ # ifndef IO_REPARSE_TAG_SYMLINK # define IO_REPARSE_TAG_SYMLINK 0xA00C # endif + +# ifndef VOLUME_NAME_NT +# define VOLUME_NAME_NT 0x2 +# endif + +# ifndef VOLUME_NAME_DOS +# define VOLUME_NAME_DOS 0x0 +# endif #endif #ifndef S_IFLNK -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ UPGRADING.INTERNALS Zend/zend_list.c Zend/zend_list.h ext/com_dotnet/com_persist.c ext/com_dotnet/com_wrapper.c ext/interbase/ibase_query.c ext/libxml/libxml.c ext/m
pajoye Thu, 16 Sep 2010 09:13:19 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303414 Log: - use TSRMLS_*C instead of TSRMLS_FETCH in zend_list_insert Changed paths: U php/php-src/trunk/UPGRADING.INTERNALS U php/php-src/trunk/Zend/zend_list.c U php/php-src/trunk/Zend/zend_list.h U php/php-src/trunk/ext/com_dotnet/com_persist.c U php/php-src/trunk/ext/com_dotnet/com_wrapper.c U php/php-src/trunk/ext/interbase/ibase_query.c U php/php-src/trunk/ext/libxml/libxml.c U php/php-src/trunk/ext/mssql/php_mssql.c U php/php-src/trunk/ext/oci8/oci8.c U php/php-src/trunk/ext/odbc/birdstep.c U php/php-src/trunk/ext/openssl/openssl.c U php/php-src/trunk/ext/openssl/xp_ssl.c U php/php-src/trunk/ext/pgsql/pgsql.c U php/php-src/trunk/ext/pspell/pspell.c U php/php-src/trunk/ext/shmop/shmop.c U php/php-src/trunk/ext/soap/php_http.c U php/php-src/trunk/ext/soap/soap.c U php/php-src/trunk/ext/standard/file.c U php/php-src/trunk/ext/standard/file.h U php/php-src/trunk/ext/standard/streamsfuncs.c U php/php-src/trunk/ext/sysvmsg/sysvmsg.c U php/php-src/trunk/main/streams/php_stream_context.h U php/php-src/trunk/main/streams/streams.c Modified: php/php-src/trunk/UPGRADING.INTERNALS === --- php/php-src/trunk/UPGRADING.INTERNALS 2010-09-16 09:12:01 UTC (rev 303413) +++ php/php-src/trunk/UPGRADING.INTERNALS 2010-09-16 09:13:19 UTC (rev 303414) @@ -66,4 +66,23 @@ Use emalloc, emalloc_rel, efree or efree_rel instead. + f. zend_list_insert +zend_list_insert uses now TSRMLS_DC: +ZEND_API int zend_list_insert(void *ptr, int type TSRMLS_DC); + +it has to be called using: + +zend_list_insert(a, SOMETYPE TSRMLS_CC); + +If zend_list_insert is used to register a resource, ZEND_REGISTER_RESOURCE +could be used instead. + + g. php_le_stream_context(TSRMLS_C) +php_le_stream_context uses now TSRMLS_D: + +PHPAPI php_stream_context *php_stream_context_alloc(TSRMLS_D) + +it has to be called using: + +context = php_stream_context_alloc(TSRMLS_C); Modified: php/php-src/trunk/Zend/zend_list.c === --- php/php-src/trunk/Zend/zend_list.c 2010-09-16 09:12:01 UTC (rev 303413) +++ php/php-src/trunk/Zend/zend_list.c 2010-09-16 09:13:19 UTC (rev 303414) @@ -32,11 +32,10 @@ static HashTable list_destructors; -ZEND_API int zend_list_insert(void *ptr, int type) +ZEND_API int zend_list_insert(void *ptr, int type TSRMLS_DC) { int index; zend_rsrc_list_entry le; - TSRMLS_FETCH(); le.ptr=ptr; le.type=type; @@ -92,11 +91,11 @@ } -ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type) +ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type TSRMLS_DC) { int rsrc_id; - rsrc_id = zend_list_insert(rsrc_pointer, rsrc_type); + rsrc_id = zend_list_insert(rsrc_pointer, rsrc_type TSRMLS_CC); if (rsrc_result) { rsrc_result-value.lval = rsrc_id; Modified: php/php-src/trunk/Zend/zend_list.h === --- php/php-src/trunk/Zend/zend_list.h 2010-09-16 09:12:01 UTC (rev 303413) +++ php/php-src/trunk/Zend/zend_list.h 2010-09-16 09:13:19 UTC (rev 303414) @@ -70,7 +70,7 @@ int zend_init_rsrc_list_dtors(void); void zend_destroy_rsrc_list_dtors(void); -ZEND_API int zend_list_insert(void *ptr, int type); +ZEND_API int zend_list_insert(void *ptr, int type TSRMLS_DC); ZEND_API int _zend_list_addref(int id TSRMLS_DC); ZEND_API int _zend_list_delete(int id TSRMLS_DC); ZEND_API void *_zend_list_find(int id, int *type TSRMLS_DC); @@ -79,7 +79,7 @@ #define zend_list_delete(id) _zend_list_delete(id TSRMLS_CC) #define zend_list_find(id, type) _zend_list_find(id, type TSRMLS_CC) -ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type); +ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type TSRMLS_DC); ZEND_API void *zend_fetch_resource(zval **passed_id TSRMLS_DC, int default_id, char *resource_type_name, int *found_resource_type, int num_resource_types, ...); ZEND_API char *zend_rsrc_list_get_rsrc_type(int resource TSRMLS_DC); @@ -107,7 +107,7 @@ (rsrc = (rsrc_type) zend_fetch_resource(passed_id TSRMLS_CC, default_id, resource_type_name, NULL, 2, resource_type1, resource_type2)) #define ZEND_REGISTER_RESOURCE(rsrc_result, rsrc_pointer, rsrc_type) \ -zend_register_resource(rsrc_result, rsrc_pointer, rsrc_type); +zend_register_resource(rsrc_result, rsrc_pointer, rsrc_type TSRMLS_CC); #define ZEND_GET_RESOURCE_TYPE_ID(le_id, le_type_name) \ if (le_id == 0) { \ Modified: php/php-src/trunk/ext/com_dotnet/com_persist.c === ---
[PHP-CVS] svn: /php/php-src/trunk/main/streams/ php_stream_context.h
pajoye Thu, 16 Sep 2010 09:18:46 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303415 Log: - use TSRMLS_*C instead of TSRMLS_FETCH in zend_list_insert, missing header Changed paths: U php/php-src/trunk/main/streams/php_stream_context.h Modified: php/php-src/trunk/main/streams/php_stream_context.h === --- php/php-src/trunk/main/streams/php_stream_context.h 2010-09-16 09:13:19 UTC (rev 303414) +++ php/php-src/trunk/main/streams/php_stream_context.h 2010-09-16 09:18:46 UTC (rev 303415) @@ -59,7 +59,7 @@ BEGIN_EXTERN_C() PHPAPI void php_stream_context_free(php_stream_context *context); -PHPAPI php_stream_context *php_stream_context_alloc(void); +PHPAPI php_stream_context *php_stream_context_alloc(TSRMLS_D); PHPAPI int php_stream_context_get_option(php_stream_context *context, const char *wrappername, const char *optionname, zval ***optionvalue); PHPAPI int php_stream_context_set_option(php_stream_context *context, -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ UPGRADING.INTERNALS ext/mysqlnd/mysqlnd_net.c ext/soap/php_sdl.c ext/soap/soap.c ext/standard/streamsfuncs.c ext/standard/url.c main/streams/php_stream_context.h
pajoye Thu, 16 Sep 2010 09:33:42 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303416 Log: - use TSRMLS_D/C with php_stream_context_alloc Changed paths: U php/php-src/trunk/UPGRADING.INTERNALS U php/php-src/trunk/ext/mysqlnd/mysqlnd_net.c U php/php-src/trunk/ext/soap/php_sdl.c U php/php-src/trunk/ext/soap/soap.c U php/php-src/trunk/ext/standard/streamsfuncs.c U php/php-src/trunk/ext/standard/url.c U php/php-src/trunk/main/streams/php_stream_context.h Modified: php/php-src/trunk/UPGRADING.INTERNALS === --- php/php-src/trunk/UPGRADING.INTERNALS 2010-09-16 09:18:46 UTC (rev 303415) +++ php/php-src/trunk/UPGRADING.INTERNALS 2010-09-16 09:33:42 UTC (rev 303416) @@ -86,3 +86,12 @@ it has to be called using: context = php_stream_context_alloc(TSRMLS_C); + + h. php_stream_context_alloc +php_stream_context_alloc uses now TSRMLS_D: + +PHPAPI php_stream_context *php_stream_context_alloc(TSRMLS_D); + +it has to be called using: + +context = php_stream_context_alloc(TSRMLS_C); Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_net.c === --- php/php-src/trunk/ext/mysqlnd/mysqlnd_net.c 2010-09-16 09:18:46 UTC (rev 303415) +++ php/php-src/trunk/ext/mysqlnd/mysqlnd_net.c 2010-09-16 09:33:42 UTC (rev 303416) @@ -731,7 +731,7 @@ MYSQLND_METHOD(mysqlnd_net, enable_ssl)(MYSQLND_NET * const net TSRMLS_DC) { #ifdef MYSQLND_SSL_SUPPORTED - php_stream_context *context = php_stream_context_alloc(); + php_stream_context *context = php_stream_context_alloc(TSRMLS_C); DBG_ENTER(mysqlnd_net::enable_ssl); if (!context) { DBG_RETURN(FAIL); Modified: php/php-src/trunk/ext/soap/php_sdl.c === --- php/php-src/trunk/ext/soap/php_sdl.c2010-09-16 09:18:46 UTC (rev 303415) +++ php/php-src/trunk/ext/soap/php_sdl.c2010-09-16 09:33:42 UTC (rev 303416) @@ -3222,7 +3222,7 @@ _stream_context, sizeof(_stream_context), (void**)tmp)) { context = php_stream_context_from_zval(*tmp, 0); } else { - context = php_stream_context_alloc(); + context = php_stream_context_alloc(TSRMLS_C); } if (zend_hash_find(Z_OBJPROP_P(this_ptr), _proxy_host, sizeof(_proxy_host), (void **) proxy_host) == SUCCESS @@ -3245,7 +3245,7 @@ smart_str_free(proxy); if (!context) { - context = php_stream_context_alloc(); + context = php_stream_context_alloc(TSRMLS_C); } php_stream_context_set_option(context, http, proxy, str_proxy); zval_ptr_dtor(str_proxy); @@ -3274,7 +3274,7 @@ zval *str_headers; if (!context) { - context = php_stream_context_alloc(); + context = php_stream_context_alloc(TSRMLS_C); } smart_str_0(headers); Modified: php/php-src/trunk/ext/soap/soap.c === --- php/php-src/trunk/ext/soap/soap.c 2010-09-16 09:18:46 UTC (rev 303415) +++ php/php-src/trunk/ext/soap/soap.c 2010-09-16 09:33:42 UTC (rev 303416) @@ -2524,7 +2524,7 @@ if (zend_hash_find(ht, local_cert, sizeof(local_cert), (void**)tmp) == SUCCESS Z_TYPE_PP(tmp) == IS_STRING) { if (!context) { - context = php_stream_context_alloc(); + context = php_stream_context_alloc(TSRMLS_C); } php_stream_context_set_option(context, ssl, local_cert, *tmp); if (zend_hash_find(ht, passphrase, sizeof(passphrase), (void**)tmp) == SUCCESS Modified: php/php-src/trunk/ext/standard/streamsfuncs.c === --- php/php-src/trunk/ext/standard/streamsfuncs.c 2010-09-16 09:18:46 UTC (rev 303415) +++ php/php-src/trunk/ext/standard/streamsfuncs.c 2010-09-16 09:33:42 UTC (rev 303416) @@ -966,7 +966,7 @@ param, but then something is called which requires a context. Don't give them the default one though since they already said they didn't want it. */ - context = stream-context = php_stream_context_alloc(); + context = stream-context = php_stream_context_alloc(TSRMLS_C); } } } @@ -1092,7 +1092,7 @@ } if (FG(default_context) == NULL) { - FG(default_context) = php_stream_context_alloc(); +
[PHP-CVS] svn: /php/php-src/trunk/ext/soap/ php_encoding.c php_packet_soap.c php_xml.c php_xml.h soap.c
pajoye Thu, 16 Sep 2010 10:01:51 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303417 Log: - cleanup ze1/ze2 Changed paths: U php/php-src/trunk/ext/soap/php_encoding.c U php/php-src/trunk/ext/soap/php_packet_soap.c U php/php-src/trunk/ext/soap/php_xml.c U php/php-src/trunk/ext/soap/php_xml.h U php/php-src/trunk/ext/soap/soap.c Modified: php/php-src/trunk/ext/soap/php_encoding.c === --- php/php-src/trunk/ext/soap/php_encoding.c 2010-09-16 09:33:42 UTC (rev 303416) +++ php/php-src/trunk/ext/soap/php_encoding.c 2010-09-16 10:01:51 UTC (rev 303417) @@ -1195,9 +1195,7 @@ old_scope = EG(scope); EG(scope) = Z_OBJCE_P(object); -#ifdef ZEND_ENGINE_2 Z_DELREF_P(val); -#endif add_property_zval(object, name, val); EG(scope) = old_scope; } @@ -2928,9 +2926,7 @@ MAKE_STD_ZVAL(soapvar); object_init_ex(soapvar, soap_var_class_entry); add_property_long(soapvar, enc_type, enc-details.type); -#ifdef ZEND_ENGINE_2 Z_DELREF_P(ret); -#endif add_property_zval(soapvar, enc_value, ret); parse_namespace(type_name, cptype, ns); nsptr = xmlSearchNs(data-doc, data, BAD_CAST(ns)); Modified: php/php-src/trunk/ext/soap/php_packet_soap.c === --- php/php-src/trunk/ext/soap/php_packet_soap.c 2010-09-16 09:33:42 UTC (rev 303416) +++ php/php-src/trunk/ext/soap/php_packet_soap.c 2010-09-16 10:01:51 UTC (rev 303417) @@ -239,11 +239,9 @@ if (faultactor) { efree(faultactor); } -#ifdef ZEND_ENGINE_2 if (details) { Z_DELREF_P(details); } -#endif xmlFreeDoc(response); return FALSE; } Modified: php/php-src/trunk/ext/soap/php_xml.c === --- php/php-src/trunk/ext/soap/php_xml.c 2010-09-16 09:33:42 UTC (rev 303416) +++ php/php-src/trunk/ext/soap/php_xml.c 2010-09-16 10:01:51 UTC (rev 303417) @@ -169,32 +169,6 @@ return ret; } -#ifndef ZEND_ENGINE_2 -int php_stream_xmlIO_match_wrapper(const char *filename) -{ - TSRMLS_FETCH(); - return php_stream_locate_url_wrapper(filename, NULL, STREAM_LOCATE_WRAPPERS_ONLY TSRMLS_CC) ? 1 : 0; -} - -void *php_stream_xmlIO_open_wrapper(const char *filename) -{ - TSRMLS_FETCH(); - return php_stream_open_wrapper((char*)filename, rb, REPORT_ERRORS, NULL); -} - -int php_stream_xmlIO_read(void *context, char *buffer, int len) -{ - TSRMLS_FETCH(); - return php_stream_read((php_stream*)context, buffer, len); -} - -int php_stream_xmlIO_close(void *context) -{ - TSRMLS_FETCH(); - return php_stream_close((php_stream*)context); -} -#endif - xmlNsPtr attr_find_ns(xmlAttrPtr node) { if (node-ns) { Modified: php/php-src/trunk/ext/soap/php_xml.h === --- php/php-src/trunk/ext/soap/php_xml.h 2010-09-16 09:33:42 UTC (rev 303416) +++ php/php-src/trunk/ext/soap/php_xml.h 2010-09-16 10:01:51 UTC (rev 303417) @@ -44,13 +44,6 @@ xmlNodePtr get_node_with_attribute_recursive_ex(xmlNodePtr node, char *name, char *name_ns, char *attribute, char *value, char *attr_ns); int parse_namespace(const xmlChar *inval,char **value,char **namespace); -#ifndef ZEND_ENGINE_2 -int php_stream_xmlIO_match_wrapper(const char *filename); -void *php_stream_xmlIO_open_wrapper(const char *filename); -int php_stream_xmlIO_read(void *context, char *buffer, int len); -int php_stream_xmlIO_close(void *context); -#endif - #define FOREACHATTRNODE(n,c,i) FOREACHATTRNODEEX(n,c,NULL,i) #define FOREACHATTRNODEEX(n,c,ns,i) \ do { \ Modified: php/php-src/trunk/ext/soap/soap.c === --- php/php-src/trunk/ext/soap/soap.c 2010-09-16 09:33:42 UTC (rev 303416) +++ php/php-src/trunk/ext/soap/soap.c 2010-09-16 10:01:51 UTC (rev 303417) @@ -26,10 +26,9 @@ #if HAVE_PHP_SESSION !defined(COMPILE_DL_SESSION) #include ext/session/php_session.h #endif -#ifdef ZEND_ENGINE_2 -# include zend_exceptions.h -#endif +#include zend_exceptions.h + static int le_sdl = 0; int le_url = 0; static int le_service = 0; @@ -69,10 +68,6 @@ static void delete_url(void *handle); static void delete_hashtable(void *hashtable); -#ifndef ZEND_ENGINE_2 -static void soap_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference); -#endif - static void soap_error_handler(int error_num, const char *error_filename, const uint error_lineno, const char *format, va_list args); #define SOAP_SERVER_BEGIN_CODE() \ @@ -90,7 +85,6 @@ SOAP_GLOBAL(error_object) = _old_error_object;\ SOAP_GLOBAL(soap_version) = _old_soap_version; -#ifdef ZEND_ENGINE_2 #define SOAP_CLIENT_BEGIN_CODE() \ zend_bool _old_handler = SOAP_GLOBAL(use_soap_error_handler);\ char* _old_error_code = SOAP_GLOBAL(error_code);\ @@ -123,23 +117,7 @@ if (_bailout) {\ zend_bailout();\ } -#else -#define
[PHP-CVS] svn: /php/php-src/trunk/ext/gd/ gd.c
pajoye Thu, 16 Sep 2010 13:34:51 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303419 Log: - zend_list_insert TSRMLS fix (thx tony for the headup) Changed paths: U php/php-src/trunk/ext/gd/gd.c Modified: php/php-src/trunk/ext/gd/gd.c === --- php/php-src/trunk/ext/gd/gd.c 2010-09-16 10:20:11 UTC (rev 303418) +++ php/php-src/trunk/ext/gd/gd.c 2010-09-16 13:34:51 UTC (rev 303419) @@ -1560,7 +1560,7 @@ * that overlap with the old fonts (with indices 1-5). The first * list index given out is always 1. */ - ind = 5 + zend_list_insert(font, le_gd_font); + ind = 5 + zend_list_insert(font, le_gd_font TSRMLS_CC); RETURN_LONG(ind); } @@ -4095,7 +4095,7 @@ } nf_ind-extend = 1; - l_ind = zend_list_insert(nf_ind, le_ps_font); + l_ind = zend_list_insert(nf_ind, le_ps_font TSRMLS_CC); RETURN_LONG(l_ind); } */ @@ -4144,7 +4144,7 @@ RETURN_FALSE; } - zend_list_insert(enc_vector, le_ps_enc); + zend_list_insert(enc_vector, le_ps_enc TSRMLS_CC); RETURN_TRUE; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/sysvmsg/sysvmsg.c trunk/ext/sysvmsg/sysvmsg.c
pajoye Thu, 16 Sep 2010 19:15:26 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303429 Log: - WS Changed paths: U php/php-src/branches/PHP_5_3/ext/sysvmsg/sysvmsg.c U php/php-src/trunk/ext/sysvmsg/sysvmsg.c Modified: php/php-src/branches/PHP_5_3/ext/sysvmsg/sysvmsg.c === --- php/php-src/branches/PHP_5_3/ext/sysvmsg/sysvmsg.c 2010-09-16 18:08:00 UTC (rev 303428) +++ php/php-src/branches/PHP_5_3/ext/sysvmsg/sysvmsg.c 2010-09-16 19:15:26 UTC (rev 303429) @@ -157,18 +157,18 @@ zval *queue, *data; sysvmsg_queue_t *mq = NULL; struct msqid_ds stat; - + RETVAL_FALSE; - + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ra, queue, data) == FAILURE) { return; } - + ZEND_FETCH_RESOURCE(mq, sysvmsg_queue_t *, queue, -1, sysvmsg queue, le_sysvmsg); if (msgctl(mq-id, IPC_STAT, stat) == 0) { zval **item; - + /* now pull out members of data and set them in the stat buffer */ if (zend_hash_find(Z_ARRVAL_P(data), msg_perm.uid, sizeof(msg_perm.uid), (void **) item) == SUCCESS) { convert_to_long_ex(item); @@ -200,18 +200,18 @@ zval *queue; sysvmsg_queue_t *mq = NULL; struct msqid_ds stat; - + RETVAL_FALSE; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, queue) == FAILURE) { return; } - + ZEND_FETCH_RESOURCE(mq, sysvmsg_queue_t *, queue, -1, sysvmsg queue, le_sysvmsg); if (msgctl(mq-id, IPC_STAT, stat) == 0) { array_init(return_value); - + add_assoc_long(return_value, msg_perm.uid, stat.msg_perm.uid); add_assoc_long(return_value, msg_perm.gid, stat.msg_perm.gid); add_assoc_long(return_value, msg_perm.mode, stat.msg_perm.mode); @@ -253,7 +253,7 @@ long key; long perms = 0666; sysvmsg_queue_t *mq; - + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l|l, key, perms) == FAILURE) { return; } @@ -271,7 +271,7 @@ RETURN_FALSE; } } - RETVAL_RESOURCE(zend_list_insert(mq, le_sysvmsg)); + RETVAL_RESOURCE(zend_list_insert(mq, le_sysvmsg)); } /* }}} */ @@ -285,7 +285,7 @@ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, queue) == FAILURE) { return; } - + ZEND_FETCH_RESOURCE(mq, sysvmsg_queue_t *, queue, -1, sysvmsg queue, le_sysvmsg); if (msgctl(mq-id, IPC_RMID, NULL) == 0) { @@ -307,10 +307,10 @@ sysvmsg_queue_t *mq = NULL; struct php_msgbuf *messagebuffer = NULL; /* buffer to transmit */ int result; - + RETVAL_FALSE; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rlzlz|blz, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rlzlz|blz, queue, desiredmsgtype, out_msgtype, maxsize, out_message, do_unserialize, flags, zerrcode) == FAILURE) { return; @@ -337,23 +337,23 @@ realflags |= IPC_NOWAIT; } } - + ZEND_FETCH_RESOURCE(mq, sysvmsg_queue_t *, queue, -1, sysvmsg queue, le_sysvmsg); messagebuffer = (struct php_msgbuf *) safe_emalloc(maxsize, 1, sizeof(struct php_msgbuf)); result = msgrcv(mq-id, messagebuffer, maxsize, desiredmsgtype, realflags); - + zval_dtor(out_msgtype); - zval_dtor(out_message); + zval_dtor(out_message); ZVAL_LONG(out_msgtype, 0); ZVAL_FALSE(out_message); - + if (zerrcode) { zval_dtor(zerrcode); ZVAL_LONG(zerrcode, 0); } - + if (result = 0) { /* got it! */ ZVAL_LONG(out_msgtype, messagebuffer-mtype); @@ -395,14 +395,14 @@ struct php_msgbuf * messagebuffer = NULL; /* buffer to transmit */ int result; int message_len = 0; - + RETVAL_FALSE; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rlz|bbz, queue, msgtype, message, do_serialize, blocking, zerror) == FAILURE) { return; } - + ZEND_FETCH_RESOURCE(mq, sysvmsg_queue_t*, queue, -1, sysvmsg queue, le_sysvmsg); if (do_serialize) { @@ -412,7 +412,7 @@ PHP_VAR_SERIALIZE_INIT(var_hash); php_var_serialize(msg_var, message, var_hash TSRMLS_CC); PHP_VAR_SERIALIZE_DESTROY(var_hash); - + /* NB: php_msgbuf is 1 char bigger than a long, so there is no need to * allocate the extra byte. */ messagebuffer = safe_emalloc(msg_var.len, 1, sizeof(struct php_msgbuf)); @@ -448,12 +448,12 @@ efree(p); } } - + /* set the message type */ messagebuffer-mtype = msgtype; result = msgsnd(mq-id, messagebuffer, message_len, blocking ? 0 : IPC_NOWAIT); - + efree(messagebuffer); if (result == -1) { Modified: php/php-src/trunk/ext/sysvmsg/sysvmsg.c === --- php/php-src/trunk/ext/sysvmsg/sysvmsg.c 2010-09-16 18:08:00 UTC (rev 303428) +++ php/php-src/trunk/ext/sysvmsg/sysvmsg.c 2010-09-16 19:15:26 UTC (rev 303429) @@ -157,18 +157,18 @@ zval *queue, *data; sysvmsg_queue_t *mq = NULL; struct msqid_ds stat; - + RETVAL_FALSE; - + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ra, queue, data) == FAILURE) { return; } - + ZEND_FETCH_RESOURCE(mq, sysvmsg_queue_t *, queue, -1, sysvmsg queue, le_sysvmsg); if (msgctl(mq-id,
[PHP-CVS] svn: /php/php-src/trunk/Zend/ Zend.dsp ZendTS.dsp zend_fast_cache.h zend_ini_scanner.c zend_ini_scanner_defs.h zend_language_scanner.c zend_language_scanner_defs.h
pajoye Wed, 15 Sep 2010 16:58:11 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303402 Log: - not used anymore Changed paths: U php/php-src/trunk/Zend/Zend.dsp U php/php-src/trunk/Zend/ZendTS.dsp D php/php-src/trunk/Zend/zend_fast_cache.h U php/php-src/trunk/Zend/zend_ini_scanner.c U php/php-src/trunk/Zend/zend_ini_scanner_defs.h U php/php-src/trunk/Zend/zend_language_scanner.c U php/php-src/trunk/Zend/zend_language_scanner_defs.h Modified: php/php-src/trunk/Zend/Zend.dsp === (Binary files differ) Modified: php/php-src/trunk/Zend/ZendTS.dsp === (Binary files differ) Deleted: php/php-src/trunk/Zend/zend_fast_cache.h === --- php/php-src/trunk/Zend/zend_fast_cache.h2010-09-15 16:31:52 UTC (rev 303401) +++ php/php-src/trunk/Zend/zend_fast_cache.h2010-09-15 16:58:11 UTC (rev 303402) @@ -1,141 +0,0 @@ -/* - +--+ - | Zend Engine | - +--+ - | Copyright (c) 1998-2010 Zend Technologies Ltd. (http://www.zend.com) | - +--+ - | This source file is subject to version 2.00 of the Zend license, | - | that is bundled with this package in the file LICENSE, and is| - | available through the world-wide-web at the following url: | - | http://www.zend.com/license/2_00.txt.| - | If you did not receive a copy of the Zend license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | lice...@zend.com so we can mail you a copy immediately. | - +--+ - | Authors: Andi Gutmans a...@zend.com| - | Zeev Suraski z...@zend.com| - +--+ -*/ - -/* $Id$ */ -#if 0 -#ifndef ZEND_FAST_CACHE_H -#define ZEND_FAST_CACHE_H - -#ifndef ZEND_ENABLE_FAST_CACHE -# if ZEND_DEBUG -# define ZEND_ENABLE_FAST_CACHE 0 -# else -# define ZEND_ENABLE_FAST_CACHE 0 -# endif -#endif - -typedef struct _zend_fast_cache_list_entry { - struct _zend_fast_cache_list_entry *next; -} zend_fast_cache_list_entry; - -#define MAX_FAST_CACHE_TYPES 4 - - -#define ZVAL_CACHE_LIST0 -#define HASHTABLE_CACHE_LIST 1 - -#if ZEND_ENABLE_FAST_CACHE - - -#include zend_globals.h -#include zend_globals_macros.h -#include zend_alloc.h - - -#if ZEND_DEBUG -# define RECORD_ZVAL_CACHE_HIT(fc_type) AG(fast_cache_stats)[fc_type][1]++; -# define RECORD_ZVAL_CACHE_MISS(fc_type) AG(fast_cache_stats)[fc_type][0]++; -#else -# define RECORD_ZVAL_CACHE_HIT(fc_type) -# define RECORD_ZVAL_CACHE_MISS(fc_type) -#endif - - -#define ZEND_FAST_ALLOC(p, type, fc_type) \ - { \ - TSRMLS_FETCH(); \ - \ - if (((p) = (type *) AG(fast_cache_list_head)[fc_type])) { \ - AG(fast_cache_list_head)[fc_type] = ((zend_fast_cache_list_entry *) AG(fast_cache_list_head)[fc_type])-next; \ - RECORD_ZVAL_CACHE_HIT(fc_type); \ - } else { \ - (p) = (type *) emalloc(sizeof(type)); \ - RECORD_ZVAL_CACHE_MISS(fc_type); \ - } \ - } - - -#define ZEND_FAST_FREE(p, fc_type) \ - { \ - TSRMLS_FETCH(); \ -
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS
pajoye Wed, 15 Sep 2010 16:59:57 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303403 Log: - fix news Changed paths: U php/php-src/branches/PHP_5_3/NEWS Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-09-15 16:58:11 UTC (rev 303402) +++ php/php-src/branches/PHP_5_3/NEWS 2010-09-15 16:59:57 UTC (rev 303403) @@ -4,8 +4,8 @@ - Upgraded bundled Sqlite3 to version 3.7.0.1. (Ilia) - Upgraded bundled PCRE to version 8.10. (Ilia) -- Added follow_location (enabled by default) option for the http stream support. - (Pierre) +- Added follow_location (enabled by default) option for the http stream + support. (Pierre) - Added new character sets to mysqlnd, which are available in MySQL 5.5 (Andrey) - Improved support for is_link and related functions on Windows. (Pierre) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ UPGRADING.INTERNALS Zend/zend_alloc.h
pajoye Wed, 15 Sep 2010 17:27:43 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303405 Log: - macros--; ZEND_FAST_* are now gone Changed paths: U php/php-src/trunk/UPGRADING.INTERNALS U php/php-src/trunk/Zend/zend_alloc.h Modified: php/php-src/trunk/UPGRADING.INTERNALS === --- php/php-src/trunk/UPGRADING.INTERNALS 2010-09-15 17:04:22 UTC (rev 303404) +++ php/php-src/trunk/UPGRADING.INTERNALS 2010-09-15 17:27:43 UTC (rev 303405) @@ -57,6 +57,13 @@ e. Zend\zend_fast_cache.h It should not have been used anymore since php5, but now this header has -been removed. +been removed. The following macros are not available anymore: +ZEND_FAST_ALLOC(p, type, fc_type) +ZEND_FAST_FREE(p, fc_type) +ZEND_FAST_ALLOC_REL(p, type, fc_type) +ZEND_FAST_FREE_REL(p, fc_type) +Use emalloc, emalloc_rel, efree or efree_rel instead. + + Modified: php/php-src/trunk/Zend/zend_alloc.h === --- php/php-src/trunk/Zend/zend_alloc.h 2010-09-15 17:04:22 UTC (rev 303404) +++ php/php-src/trunk/Zend/zend_alloc.h 2010-09-15 17:27:43 UTC (rev 303405) @@ -161,45 +161,31 @@ END_EXTERN_C() -/* Macroses for zend_fast_cache.h compatibility */ - -#define ZEND_FAST_ALLOC(p, type, fc_type) \ - (p) = (type *) emalloc(sizeof(type)) - -#define ZEND_FAST_FREE(p, fc_type) \ - efree(p) - -#define ZEND_FAST_ALLOC_REL(p, type, fc_type) \ - (p) = (type *) emalloc_rel(sizeof(type)) - -#define ZEND_FAST_FREE_REL(p, fc_type) \ - efree_rel(p) - /* fast cache for zval's */ #define ALLOC_ZVAL(z) \ - ZEND_FAST_ALLOC(z, zval, ZVAL_CACHE_LIST) + (z) = (zval *) emalloc(sizeof(zval)) #define FREE_ZVAL(z) \ - ZEND_FAST_FREE(z, ZVAL_CACHE_LIST) + efree_rel(z) #define ALLOC_ZVAL_REL(z) \ - ZEND_FAST_ALLOC_REL(z, zval, ZVAL_CACHE_LIST) + (z) = (zval *) emalloc_rel(sizeof(zval)) #define FREE_ZVAL_REL(z) \ - ZEND_FAST_FREE_REL(z, ZVAL_CACHE_LIST) + efree_rel(z) /* fast cache for HashTables */ #define ALLOC_HASHTABLE(ht)\ - ZEND_FAST_ALLOC(ht, HashTable, HASHTABLE_CACHE_LIST) + (ht) = (HashTable *) emalloc(sizeof(HashTable)) #define FREE_HASHTABLE(ht) \ - ZEND_FAST_FREE(ht, HASHTABLE_CACHE_LIST) + efree(ht) #define ALLOC_HASHTABLE_REL(ht)\ - ZEND_FAST_ALLOC_REL(ht, HashTable, HASHTABLE_CACHE_LIST) + (ht) = (HashTable *) emalloc_rel(sizeof(HashTable)) #define FREE_HASHTABLE_REL(ht) \ - ZEND_FAST_FREE_REL(ht, HASHTABLE_CACHE_LIST) + efree_rel(ht) /* Heap functions */ typedef struct _zend_mm_heap zend_mm_heap; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/win32/ php5dll.dsp php5dllts.dsp
pajoye Wed, 15 Sep 2010 22:11:28 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303408 Log: - not there anymore Changed paths: U php/php-src/trunk/win32/php5dll.dsp U php/php-src/trunk/win32/php5dllts.dsp Modified: php/php-src/trunk/win32/php5dll.dsp === (Binary files differ) Modified: php/php-src/trunk/win32/php5dllts.dsp === (Binary files differ) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/cgi/ cgi_main.c
pajoye Wed, 15 Sep 2010 22:25:44 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303410 Log: - unused, double declared Changed paths: U php/php-src/trunk/sapi/cgi/cgi_main.c Modified: php/php-src/trunk/sapi/cgi/cgi_main.c === --- php/php-src/trunk/sapi/cgi/cgi_main.c 2010-09-15 22:17:18 UTC (rev 303409) +++ php/php-src/trunk/sapi/cgi/cgi_main.c 2010-09-15 22:25:44 UTC (rev 303410) @@ -105,6 +105,7 @@ */ static int children = 0; + /** * Set to non-zero if we are the parent process */ @@ -669,7 +670,6 @@ if (CGIG(fix_pathinfo)) { char *script_name = SG(request_info).request_uri; char *path_info; - unsigned int path_info_len; int free_php_self; ALLOCA_FLAG(use_heap) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/sapi/cli/php_cli.c trunk/sapi/cli/php_cli.c
pajoye Tue, 14 Sep 2010 10:36:21 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303357 Log: - fix #48831 php -i has different output to php --ini Bug: http://bugs.php.net/48831 (Assigned) php -i has different output to php --ini Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/sapi/cli/php_cli.c U php/php-src/trunk/sapi/cli/php_cli.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-09-14 09:41:26 UTC (rev 303356) +++ php/php-src/branches/PHP_5_3/NEWS 2010-09-14 10:36:21 UTC (rev 303357) @@ -87,6 +87,8 @@ - Fixed bug #50524 (proc_open on Windows does not respect cwd as it does on other platforms). (Pierre) - Fixed bug #49215 (make fails on glob_wrapper). (Felipe) +- Fixed bug #48831 (php -i has different output to php --ini). (Richard, + Pierre) 22 Jul 2010, PHP 5.3.3 - Upgraded bundled sqlite to version 3.6.23.1. (Ilia) Modified: php/php-src/branches/PHP_5_3/sapi/cli/php_cli.c === --- php/php-src/branches/PHP_5_3/sapi/cli/php_cli.c 2010-09-14 09:41:26 UTC (rev 303356) +++ php/php-src/branches/PHP_5_3/sapi/cli/php_cli.c 2010-09-14 10:36:21 UTC (rev 303357) @@ -100,6 +100,7 @@ #endif PHPAPI extern char *php_ini_opened_path; +PHPAPI extern char *php_ini_scanned_path; PHPAPI extern char *php_ini_scanned_files; #ifndef O_BINARY Modified: php/php-src/trunk/sapi/cli/php_cli.c === --- php/php-src/trunk/sapi/cli/php_cli.c2010-09-14 09:41:26 UTC (rev 303356) +++ php/php-src/trunk/sapi/cli/php_cli.c2010-09-14 10:36:21 UTC (rev 303357) @@ -100,6 +100,7 @@ #endif PHPAPI extern char *php_ini_opened_path; +PHPAPI extern char *php_ini_scanned_path; PHPAPI extern char *php_ini_scanned_files; #ifndef O_BINARY @@ -1424,7 +1425,7 @@ { zend_printf(Configuration File (php.ini) Path: %s\n, PHP_CONFIG_FILE_PATH); zend_printf(Loaded Configuration File: %s\n, php_ini_opened_path ? php_ini_opened_path : (none)); - zend_printf(Scan for additional .ini files in: %s\n, *PHP_CONFIG_FILE_SCAN_DIR ? PHP_CONFIG_FILE_SCAN_DIR : (none)); + zend_printf(Scan for additional .ini files in: %s\n, php_ini_scanned_path ? php_ini_scanned_path : (none)); zend_printf(Additional .ini files parsed: %s\n, php_ini_scanned_files ? php_ini_scanned_files : (none)); break; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c trunk/TSRM/tsrm_virtual_cwd.c
pajoye Mon, 13 Sep 2010 10:58:18 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303315 Log: - sanity check for the path length and don't treat UNC as local path (no functional change, only less ops) Changed paths: U php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c U php/php-src/trunk/TSRM/tsrm_virtual_cwd.c Modified: php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c === --- php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c2010-09-13 10:47:32 UTC (rev 303314) +++ php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c2010-09-13 10:58:18 UTC (rev 303315) @@ -273,17 +273,20 @@ { WIN32_FILE_ATTRIBUTE_DATA data; __int64 t; + const size_t path_len = strlen(path); if (!GetFileAttributesEx(path, GetFileExInfoStandard, data)) { return stat(path, buf); } - if (path[1] == ':') { + if (path_len = 1 path[1] == ':') { if (path[0] = 'A' path[0] = 'Z') { buf-st_dev = buf-st_rdev = path[0] - 'A'; } else { buf-st_dev = buf-st_rdev = path[0] - 'a'; } + } else if (IS_UNC_PATH(path, path_len)) { + buf-st_dev = buf-st_rdev = 0; } else { char cur_path[MAXPATHLEN+1]; DWORD len = sizeof(cur_path); Modified: php/php-src/trunk/TSRM/tsrm_virtual_cwd.c === --- php/php-src/trunk/TSRM/tsrm_virtual_cwd.c 2010-09-13 10:47:32 UTC (rev 303314) +++ php/php-src/trunk/TSRM/tsrm_virtual_cwd.c 2010-09-13 10:58:18 UTC (rev 303315) @@ -273,17 +273,20 @@ { WIN32_FILE_ATTRIBUTE_DATA data; __int64 t; + const size_t path_len = strlen(path); if (!GetFileAttributesEx(path, GetFileExInfoStandard, data)) { return stat(path, buf); } - if (path[1] == ':') { + if (path_len = 1 path[1] == ':') { if (path[0] = 'A' path[0] = 'Z') { buf-st_dev = buf-st_rdev = path[0] - 'A'; } else { buf-st_dev = buf-st_rdev = path[0] - 'a'; } + } else if (IS_UNC_PATH(path, path_len)) { + buf-st_dev = buf-st_rdev = 0; } else { char cur_path[MAXPATHLEN+1]; DWORD len = sizeof(cur_path); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/win32/glob.c trunk/win32/glob.c
pajoye Mon, 13 Sep 2010 11:06:18 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303316 Log: - ws Changed paths: U php/php-src/branches/PHP_5_3/win32/glob.c U php/php-src/trunk/win32/glob.c Modified: php/php-src/branches/PHP_5_3/win32/glob.c === --- php/php-src/branches/PHP_5_3/win32/glob.c 2010-09-13 10:58:18 UTC (rev 303315) +++ php/php-src/branches/PHP_5_3/win32/glob.c 2010-09-13 11:06:18 UTC (rev 303316) @@ -146,12 +146,11 @@ static int glob0(const Char *, glob_t *); static int glob1(Char *, Char *, glob_t *, size_t *); static int glob2(Char *, Char *, Char *, Char *, Char *, Char *, - glob_t *, size_t *); +glob_t *, size_t *); static int glob3(Char *, Char *, Char *, Char *, Char *, Char *, - Char *, Char *, glob_t *, size_t *); +Char *, Char *, glob_t *, size_t *); static int globextend(const Char *, glob_t *, size_t *); -static const Char * - globtilde(const Char *, Char *, size_t, glob_t *); +static const Char *globtilde(const Char *, Char *, size_t, glob_t *); static int globexp1(const Char *, glob_t *); static int globexp2(const Char *, const Char *, glob_t *, int *); static int match(Char *, Char *, Char *); @@ -370,7 +369,7 @@ /* Copy up to the end of the string or / */ eb = patbuf[patbuf_len - 1]; for (p = pattern + 1, h = (char *) patbuf; - h (char *)eb *p *p != SLASH; *h++ = (char) *p++) + h (char *)eb *p *p != SLASH; *h++ = (char) *p++) ; *h = EOS; @@ -451,7 +450,7 @@ if (c == NOT) ++qpatnext; if (*qpatnext == EOS || - g_strchr((Char *) qpatnext+1, RBRACKET) == NULL) { +g_strchr((Char *) qpatnext+1, RBRACKET) == NULL) { *bufnext++ = LBRACKET; if (c == NOT) --qpatnext; @@ -464,7 +463,7 @@ do { *bufnext++ = CHAR(c); if (*qpatnext == RANGE -(c = qpatnext[1]) != RBRACKET) { + (c = qpatnext[1]) != RBRACKET) { *bufnext++ = M_RNG; *bufnext++ = CHAR(c); qpatnext += 2; @@ -506,8 +505,8 @@ */ if (pglob-gl_pathc == oldpathc) { if ((pglob-gl_flags GLOB_NOCHECK) || - ((pglob-gl_flags GLOB_NOMAGIC) - !(pglob-gl_flags GLOB_MAGCHAR))) + ((pglob-gl_flags GLOB_NOMAGIC) + !(pglob-gl_flags GLOB_MAGCHAR))) return(globextend(pattern, pglob, limit)); else return(GLOB_NOMATCH); @@ -536,8 +535,8 @@ if (*pattern == EOS) return(0); return(glob2(pathbuf, pathbuf+MAXPATHLEN-1, - pathbuf, pathbuf+MAXPATHLEN-1, - pattern, pattern_last, pglob, limitp)); + pathbuf, pathbuf+MAXPATHLEN-1, + pattern, pattern_last, pglob, limitp)); } /* @@ -547,7 +546,7 @@ */ static int glob2(pathbuf, pathbuf_last, pathend, pathend_last, pattern, -pattern_last, pglob, limitp) + pattern_last, pglob, limitp) Char *pathbuf, *pathbuf_last, *pathend, *pathend_last; Char *pattern, *pattern_last; glob_t *pglob; @@ -568,10 +567,10 @@ return(0); if (((pglob-gl_flags GLOB_MARK) - !IS_SLASH(pathend[-1])) (S_ISDIR(sb.st_mode) || - (S_ISLNK(sb.st_mode) - (g_stat(pathbuf, sb, pglob) == 0) - S_ISDIR(sb.st_mode { +!IS_SLASH(pathend[-1])) (S_ISDIR(sb.st_mode) || +(S_ISLNK(sb.st_mode) +(g_stat(pathbuf, sb, pglob) == 0) +S_ISDIR(sb.st_mode { if (pathend+1 pathend_last) return (1); *pathend++ = SEP; @@ -603,15 +602,15 @@ } else /* Need expansion, recurse. */ return(glob3(pathbuf, pathbuf_last, pathend, - pathend_last, pattern, pattern_last, - p, pattern_last, pglob, limitp)); +pathend_last, pattern, pattern_last, +p, pattern_last, pglob, limitp)); } /* NOTREACHED */ } static int glob3(pathbuf, pathbuf_last, pathend, pathend_last, pattern, pattern_last, -restpattern, restpattern_last, pglob, limitp) + restpattern, restpattern_last, pglob, limitp) Char *pathbuf, *pathbuf_last, *pathend, *pathend_last; Char *pattern, *pattern_last, *restpattern, *restpattern_last; glob_t *pglob; @@ -641,7 +640,7 @@ if (g_Ctoc(pathbuf, buf, sizeof(buf))) return(GLOB_ABORTED); if (pglob-gl_errfunc(buf, errno) || - pglob-gl_flags GLOB_ERR) +pglob-gl_flags GLOB_ERR) return(GLOB_ABORTED); } return(0); @@ -676,7 +675,7 @@ continue; } err = glob2(pathbuf, pathbuf_last, --dc, pathend_last, - restpattern, restpattern_last, pglob, limitp); + restpattern, restpattern_last, pglob, limitp); if (err) break; } @@ -717,7 +716,7 @@ newsize = sizeof(*pathv) * (2 + pglob-gl_pathc + pglob-gl_offs); pathv = pglob-gl_pathv ? realloc((char *)pglob-gl_pathv, newsize) : - malloc(newsize); + malloc(newsize); if (pathv == NULL) { if (pglob-gl_pathv) { free(pglob-gl_pathv); @@ -748,7 +747,7 @@ pathv[pglob-gl_offs + pglob-gl_pathc] = NULL; if ((pglob-gl_flags GLOB_LIMIT) - newsize + *limitp = ARG_MAX) { + newsize + *limitp = ARG_MAX) { errno =
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/win32/glob.c trunk/win32/glob.c
pajoye Mon, 13 Sep 2010 11:17:40 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303317 Log: - use php_sys_sat Changed paths: U php/php-src/branches/PHP_5_3/win32/glob.c U php/php-src/trunk/win32/glob.c Modified: php/php-src/branches/PHP_5_3/win32/glob.c === --- php/php-src/branches/PHP_5_3/win32/glob.c 2010-09-13 11:06:18 UTC (rev 303316) +++ php/php-src/branches/PHP_5_3/win32/glob.c 2010-09-13 11:17:40 UTC (rev 303317) @@ -873,7 +873,7 @@ return(-1); if (pglob-gl_flags GLOB_ALTDIRFUNC) return((*pglob-gl_stat)(buf, sb)); - return(stat(buf, sb)); + return(php_sys_stat(buf, sb)); } static Char * Modified: php/php-src/trunk/win32/glob.c === --- php/php-src/trunk/win32/glob.c 2010-09-13 11:06:18 UTC (rev 303316) +++ php/php-src/trunk/win32/glob.c 2010-09-13 11:17:40 UTC (rev 303317) @@ -873,7 +873,7 @@ return(-1); if (pglob-gl_flags GLOB_ALTDIRFUNC) return((*pglob-gl_stat)(buf, sb)); - return(stat(buf, sb)); + return(php_sys_stat(buf, sb)); } static Char * -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/standard/ var.c
pajoye Mon, 13 Sep 2010 21:54:47 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303332 Log: - fix build introduced by fix for #52772 Bug: http://bugs.php.net/52772 (Closed) var_dump() doesn't check for the existence of get_class_name before calling it Changed paths: U php/php-src/trunk/ext/standard/var.c Modified: php/php-src/trunk/ext/standard/var.c === --- php/php-src/trunk/ext/standard/var.c2010-09-13 21:50:02 UTC (rev 303331) +++ php/php-src/trunk/ext/standard/var.c2010-09-13 21:54:47 UTC (rev 303332) @@ -133,7 +133,7 @@ return; } - if (Z_OBJ_HANDLER(**struc, get_class_name) { + if (Z_OBJ_HANDLER(**struc, get_class_name)) { Z_OBJ_HANDLER(**struc, get_class_name)(*struc, class_name, class_name_len, 0 TSRMLS_CC); php_printf(%sobject(%s)#%d (%d) {\n, COMMON, class_name, Z_OBJ_HANDLE_PP(struc), myht ? zend_hash_num_elements(myht) : 0); efree(class_name); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h branches/PHP_5_3/UPGRADING.INTERNALS trunk/TSRM/tsrm_virtual_cwd.c trunk/TSRM/tsrm_virtua
pajoye Fri, 10 Sep 2010 14:01:44 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303256 Log: - add php_sys_readlink Changed paths: U php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c U php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h U php/php-src/branches/PHP_5_3/UPGRADING.INTERNALS U php/php-src/trunk/TSRM/tsrm_virtual_cwd.c U php/php-src/trunk/TSRM/tsrm_virtual_cwd.h U php/php-src/trunk/UPGRADING.INTERNALS Modified: php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c === --- php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c2010-09-10 13:22:05 UTC (rev 303255) +++ php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c2010-09-10 14:01:44 UTC (rev 303256) @@ -207,6 +207,60 @@ return (time_t)UnixTime; } +CWD_API int php_sys_readlink(const char *link, char *target, size_t target_len){ /* {{{ */ + HINSTANCE kernel32; + HANDLE hFile; + DWORD dwRet; + + typedef BOOL (WINAPI *gfpnh_func)(HANDLE, LPTSTR, DWORD, DWORD); + gfpnh_func pGetFinalPathNameByHandle; + + kernel32 = LoadLibrary(kernel32.dll); + + if (kernel32) { + pGetFinalPathNameByHandle = (gfpnh_func)GetProcAddress(kernel32, GetFinalPathNameByHandleA); + if (pGetFinalPathNameByHandle == NULL) { + return -1; + } + } else { + return -1; + } + + hFile = CreateFile(link,// file to open +GENERIC_READ, // open for reading +FILE_SHARE_READ, // share for reading +NULL, // default security +OPEN_EXISTING, // existing file only +FILE_FLAG_BACKUP_SEMANTICS, // normal file +NULL); // no attr. template + + if( hFile == INVALID_HANDLE_VALUE) { + return -1; + } + + dwRet = pGetFinalPathNameByHandle(hFile, target, MAXPATHLEN, VOLUME_NAME_DOS); + if(dwRet = MAXPATHLEN) { + return -1; + } + + CloseHandle(hFile); + + if(dwRet 4) { + /* Skip first 4 characters if they are \??\ */ + if(target[0] == '\\' target[1] == '\\' target[2] == '?' target[3] == '\\') { + char tmp[MAXPATHLEN]; + + dwRet -= 4; + memcpy(tmp, target + 4, dwRet); + memcpy(target, tmp, dwRet); + } + } + + target[dwRet] = '\0'; + return dwRet; +} +/* }}} */ + CWD_API int php_sys_stat_ex(const char *path, struct stat *buf, int lstat) /* {{{ */ { WIN32_FILE_ATTRIBUTE_DATA data; @@ -756,7 +810,7 @@ tmp = tsrm_do_alloca(len+1, use_heap); memcpy(tmp, path, len+1); - if(save + if(save !(IS_UNC_PATH(path, len) len = 3 path[2] != '?') (data.dwFileAttributes FILE_ATTRIBUTE_REPARSE_POINT)) { /* File is a reparse point. Get the target */ Modified: php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h === --- php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h2010-09-10 13:22:05 UTC (rev 303255) +++ php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h2010-09-10 14:01:44 UTC (rev 303256) @@ -133,9 +133,13 @@ CWD_API int php_sys_stat_ex(const char *path, struct stat *buf, int lstat); # define php_sys_stat(path, buf) php_sys_stat_ex(path, buf, 0) # define php_sys_lstat(path, buf) php_sys_stat_ex(path, buf, 1) +CWD_API int php_sys_readlink(link, target, target_len); #else # define php_sys_stat stat # define php_sys_lstat lstat +# ifdef HAVE_SYMLINK +# define php_sys_readlink(link, target, target_len) readlink(link, target, target_len) +# endif #endif typedef struct _cwd_state { Modified: php/php-src/branches/PHP_5_3/UPGRADING.INTERNALS === --- php/php-src/branches/PHP_5_3/UPGRADING.INTERNALS2010-09-10 13:22:05 UTC (rev 303255) +++ php/php-src/branches/PHP_5_3/UPGRADING.INTERNALS2010-09-10 14:01:44 UTC (rev 303256) @@ -8,9 +8,16 @@ 1. Internal API changes - b. stat/lstat support + a. stat/lstat support lstat is now available on all platforms. On unix-like platform php_sys_lstat is an alias to lstat (when avaible). On Windows it is now available using php_sys_lstat. php_sys_stat and php_sys_lstat usage is recommended instead of calling lstat directly, to ensure portability. + + b. readlink support + +readlink is now available on all
[PHP-CVS] svn: /php/php-src/trunk/TSRM/ tsrm_virtual_cwd.c
pajoye Fri, 10 Sep 2010 14:02:19 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303257 Log: - WS Changed paths: U php/php-src/trunk/TSRM/tsrm_virtual_cwd.c Modified: php/php-src/trunk/TSRM/tsrm_virtual_cwd.c === --- php/php-src/trunk/TSRM/tsrm_virtual_cwd.c 2010-09-10 14:01:44 UTC (rev 303256) +++ php/php-src/trunk/TSRM/tsrm_virtual_cwd.c 2010-09-10 14:02:19 UTC (rev 303257) @@ -88,14 +88,14 @@ #include tchar.h #define tsrm_strtok_r(a,b,c) _tcstok((a),(b)) #define TOKENIZER_STRING /\\ - -static int php_check_dots(const char *element, int n) + +static int php_check_dots(const char *element, int n) { while (n-- 0) if (element[n] != '.') break; return (n != -1); } - + #define IS_DIRECTORY_UP(element, len) \ (len = 2 !php_check_dots(element, len)) @@ -129,7 +129,7 @@ /* define this to check semantics */ #define IS_DIR_OK(s) (1) - + #ifndef IS_DIR_OK #define IS_DIR_OK(state) (php_is_dir_ok(state) == 0) #endif @@ -142,7 +142,7 @@ #define CWD_STATE_FREE(s) \ free((s)-cwd); - + #ifdef TSRM_WIN32 #ifdef CTL_CODE @@ -249,7 +249,7 @@ /* Skip first 4 characters if they are \??\ */ if(target[0] == '\\' target[1] == '\\' target[2] == '?' target[3] == '\\') { char tmp[MAXPATHLEN]; - + dwRet -= 4; memcpy(tmp, target + 4, dwRet); memcpy(target, tmp, dwRet); @@ -428,7 +428,7 @@ } } #else - result = getcwd(cwd, sizeof(cwd)); + result = getcwd(cwd, sizeof(cwd)); #endif if (!result) { cwd[0] = '\0'; @@ -479,7 +479,7 @@ *length = 1; retval = (char *) malloc(2); retval[0] = DEFAULT_SLASH; - retval[1] = '\0'; + retval[1] = '\0'; return retval; } @@ -606,7 +606,7 @@ { long size = sizeof(realpath_cache_bucket) + path_len + 1; int same = 1; - + if (realpath_len != path_len || memcmp(path, realpath, path_len) != 0) { size += realpath_len + 1; @@ -682,17 +682,17 @@ } /* }}} */ -CWD_API int realpath_cache_size(TSRMLS_D) +CWD_API int realpath_cache_size(TSRMLS_D) { return CWDG(realpath_cache_size); } -CWD_API int realpath_cache_max_buckets(TSRMLS_D) +CWD_API int realpath_cache_max_buckets(TSRMLS_D) { return (sizeof(CWDG(realpath_cache)) / sizeof(CWDG(realpath_cache)[0])); } -CWD_API realpath_cache_bucket** realpath_cache_get_buckets(TSRMLS_D) +CWD_API realpath_cache_bucket** realpath_cache_get_buckets(TSRMLS_D) { return CWDG(realpath_cache); } @@ -751,7 +751,7 @@ path[4] = '.'; path[5] = DEFAULT_SLASH; j = 5; - } else if (j 0 + } else if (j 0 path[j+1] == '.' path[j+2] == '.' IS_SLASH(path[j+3])) { j += 4; @@ -769,7 +769,7 @@ } return j; } - + path[len] = 0; save = (use_realpath != CWD_EXPAND); @@ -802,7 +802,7 @@ /* continue resolution anyway but don't save result in the cache */ save = 0; } - + if (save) { FindClose(hFind); } @@ -810,7 +810,7 @@ tmp = tsrm_do_alloca(len+1, use_heap); memcpy(tmp, path, len+1); - if(save + if(save !(IS_UNC_PATH(path, len) len = 3 path[2] != '?') (data.dwFileAttributes FILE_ATTRIBUTE_REPARSE_POINT)) { /* File is a reparse point. Get the target */ @@ -847,7 +847,7 @@ reparsetarget = pbuffer-SymbolicLinkReparseBuffer.ReparseTarget; printname_len = pbuffer-MountPointReparseBuffer.PrintNameLength / sizeof(WCHAR); isabsolute = (pbuffer-SymbolicLinkReparseBuffer.Flags == 0) ? 1 : 0; -if (!WideCharToMultiByte(CP_THREAD_ACP, 0, +if (!WideCharToMultiByte(CP_THREAD_ACP, 0, reparsetarget + pbuffer-MountPointReparseBuffer.PrintNameOffset / sizeof(WCHAR), printname_len + 1, printname, MAX_PATH, NULL, NULL @@ -859,7 +859,7 @@ printname[printname_len] = 0; substitutename_len = pbuffer-MountPointReparseBuffer.SubstituteNameLength / sizeof(WCHAR); -if (!WideCharToMultiByte(CP_THREAD_ACP, 0, +if (!WideCharToMultiByte(CP_THREAD_ACP, 0, reparsetarget + pbuffer-MountPointReparseBuffer.SubstituteNameOffset / sizeof(WCHAR), substitutename_len + 1, substitutename, MAX_PATH, NULL, NULL @@ -873,7 +873,7 @@ isabsolute = 1; reparsetarget = pbuffer-MountPointReparseBuffer.ReparseTarget; printname_len = pbuffer-MountPointReparseBuffer.PrintNameLength / sizeof(WCHAR); -if (!WideCharToMultiByte(CP_THREAD_ACP, 0, +if (!WideCharToMultiByte(CP_THREAD_ACP, 0, reparsetarget + pbuffer-MountPointReparseBuffer.PrintNameOffset / sizeof(WCHAR), printname_len + 1, printname, MAX_PATH, NULL, NULL @@ -884,7 +884,7 @@ printname[pbuffer-MountPointReparseBuffer.PrintNameLength / sizeof(WCHAR)] = 0; substitutename_len = pbuffer-MountPointReparseBuffer.SubstituteNameLength / sizeof(WCHAR); -if (!WideCharToMultiByte(CP_THREAD_ACP, 0, +if (!WideCharToMultiByte(CP_THREAD_ACP, 0, reparsetarget + pbuffer-MountPointReparseBuffer.SubstituteNameOffset /
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/spl/spl_directory.c trunk/ext/spl/spl_directory.c
pajoye Fri, 10 Sep 2010 14:17:40 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303258 Log: - Implement bug #51804, splFileInfo::getLinkTarget() on Windows Bug: http://bugs.php.net/51804 (Assigned) SplFileInfo::getLinkTarget() Fails. Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/spl/spl_directory.c U php/php-src/trunk/ext/spl/spl_directory.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-09-10 14:02:19 UTC (rev 303257) +++ php/php-src/branches/PHP_5_3/NEWS 2010-09-10 14:17:40 UTC (rev 303258) @@ -10,6 +10,8 @@ (Andrey) - Improved support for is_link and related functions on Windows. (Pierre) +- Implemented FR #51804, SplFileInfo::getLinkTarget on Windows. (Pierre) + - Fixed symbolic resolution support when the target is a DFS share. (Pierre) - Fixed MOPS-2010-24, fix string validation. (CVE-2010-2950). (Pierre) - Changed deprecated ini options on startup from E_WARNING to E_DEPRECATED. Modified: php/php-src/branches/PHP_5_3/ext/spl/spl_directory.c === --- php/php-src/branches/PHP_5_3/ext/spl/spl_directory.c2010-09-10 14:02:19 UTC (rev 303257) +++ php/php-src/branches/PHP_5_3/ext/spl/spl_directory.c2010-09-10 14:17:40 UTC (rev 303258) @@ -1050,8 +1050,21 @@ zend_replace_error_handling(EH_THROW, spl_ce_RuntimeException, error_handling TSRMLS_CC); -#ifdef HAVE_SYMLINK - ret = readlink(intern-file_name, buff, MAXPATHLEN-1); +#if defined(PHP_WIN32) || HAVE_SYMLINK + if (!IS_ABSOLUTE_PATH(intern-file_name, intern-file_name_len)) { + char expanded_path[MAXPATHLEN]; + + /* TODO: Fix expand_filepath to do not resolve links but only expand the path + avoiding double two resolution attempts + (Pierre) */ + if (!expand_filepath(intern-file_name, expanded_path TSRMLS_CC)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, No such file or directory); + RETURN_FALSE; + } + ret = php_sys_readlink(expanded_path, buff, MAXPATHLEN - 1); + } else { + ret = php_sys_readlink(intern-file_name, buff, MAXPATHLEN-1); + } #else ret = -1; /* always fail if not implemented */ #endif Modified: php/php-src/trunk/ext/spl/spl_directory.c === --- php/php-src/trunk/ext/spl/spl_directory.c 2010-09-10 14:02:19 UTC (rev 303257) +++ php/php-src/trunk/ext/spl/spl_directory.c 2010-09-10 14:17:40 UTC (rev 303258) @@ -1053,8 +1053,20 @@ zend_replace_error_handling(EH_THROW, spl_ce_RuntimeException, error_handling TSRMLS_CC); -#ifdef HAVE_SYMLINK - ret = readlink(intern-file_name, buff, MAXPATHLEN-1); +#if defined(PHP_WIN32) || HAVE_SYMLINK + if (!IS_ABSOLUTE_PATH(intern-file_name, intern-file_name_len)) { + char expanded_path[MAXPATHLEN]; + + /* TODO: Fix expand_filepath to do not resolve links but only expand the path + (Pierre) */ + if (!expand_filepath(intern-file_name, expanded_path TSRMLS_CC)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, No such file or directory); + RETURN_FALSE; + } + ret = php_sys_readlink(expanded_path, buff, MAXPATHLEN - 1); + } else { + ret = php_sys_readlink(intern-file_name, buff, MAXPATHLEN-1); + } #else ret = -1; /* always fail if not implemented */ #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/UPGRADING branches/PHP_5_3/main/fopen_wrappers.c trunk/main/fopen_wrappers.c
pajoye Fri, 10 Sep 2010 17:45:13 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303260 Log: - open_basedir symlink support for Windows Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/UPGRADING U php/php-src/branches/PHP_5_3/main/fopen_wrappers.c U php/php-src/trunk/main/fopen_wrappers.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-09-10 15:11:03 UTC (rev 303259) +++ php/php-src/branches/PHP_5_3/NEWS 2010-09-10 17:45:13 UTC (rev 303260) @@ -10,6 +10,7 @@ (Andrey) - Improved support for is_link and related functions on Windows. (Pierre) +- Implemented symbolic links support for open_basedir checks. (Pierre) - Implemented FR #51804, SplFileInfo::getLinkTarget on Windows. (Pierre) - Fixed symbolic resolution support when the target is a DFS share. (Pierre) Modified: php/php-src/branches/PHP_5_3/UPGRADING === --- php/php-src/branches/PHP_5_3/UPGRADING 2010-09-10 15:11:03 UTC (rev 303259) +++ php/php-src/branches/PHP_5_3/UPGRADING 2010-09-10 17:45:13 UTC (rev 303260) @@ -457,6 +457,14 @@ - Firebird and SNMP support are no longer available on Windows. Firebird support may be reintroduced in the future. += +11.1 New in PHP 5.3.4 += + +- open_basedir supports now symbolic links (checks the target). +- is_link and SplFileInfo symbolic links related method are now fully supported + (on Windows Vista or later). + === 12. New in PHP 5.3: === Modified: php/php-src/branches/PHP_5_3/main/fopen_wrappers.c === --- php/php-src/branches/PHP_5_3/main/fopen_wrappers.c 2010-09-10 15:11:03 UTC (rev 303259) +++ php/php-src/branches/PHP_5_3/main/fopen_wrappers.c 2010-09-10 17:45:13 UTC (rev 303260) @@ -173,21 +173,27 @@ memcpy(path_tmp, resolved_name, path_len + 1); /* safe */ while (VCWD_REALPATH(path_tmp, resolved_name) == NULL) { -#ifdef HAVE_SYMLINK - if (nesting_level == 0) { - int ret; - char buf[MAXPATHLEN]; +#if defined(PHP_WIN32) || defined(HAVE_SYMLINK) +#if defined(PHP_WIN32) + if (EG(windows_version_info).dwMajorVersion 5) { +#endif + if (nesting_level == 0) { + int ret; + char buf[MAXPATHLEN]; - ret = readlink(path_tmp, buf, MAXPATHLEN - 1); - if (ret 0) { - /* not a broken symlink, move along.. */ - } else { - /* put the real path into the path buffer */ - memcpy(path_tmp, buf, ret); - path_tmp[ret] = '\0'; + ret = php_sys_readlink(path_tmp, buf, MAXPATHLEN - 1); + if (ret 0) { + /* not a broken symlink, move along.. */ + } else { + /* put the real path into the path buffer */ + memcpy(path_tmp, buf, ret); + path_tmp[ret] = '\0'; + } } +#if defined(PHP_WIN32) } #endif +#endif #if defined(PHP_WIN32) || defined(NETWARE) path_file = strrchr(path_tmp, DEFAULT_SLASH); Modified: php/php-src/trunk/main/fopen_wrappers.c === --- php/php-src/trunk/main/fopen_wrappers.c 2010-09-10 15:11:03 UTC (rev 303259) +++ php/php-src/trunk/main/fopen_wrappers.c 2010-09-10 17:45:13 UTC (rev 303260) @@ -172,21 +172,27 @@ memcpy(path_tmp, resolved_name, path_len + 1); /* safe */ while (VCWD_REALPATH(path_tmp, resolved_name) == NULL) { -#ifdef HAVE_SYMLINK - if (nesting_level == 0) { - int ret; - char buf[MAXPATHLEN]; +#if defined(PHP_WIN32) || defined(HAVE_SYMLINK) +#if defined(PHP_WIN32) + if (EG(windows_version_info).dwMajorVersion 5) { +#endif + if (nesting_level == 0) { + int ret; + char buf[MAXPATHLEN]; - ret = readlink(path_tmp, buf, MAXPATHLEN - 1); - if (ret 0) { - /* not a broken symlink, move along.. */ - } else { - /* put the real path into the path buffer */ - memcpy(path_tmp, buf, ret
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c trunk/TSRM/tsrm_virtual_cwd.c
pajoye Fri, 10 Sep 2010 19:21:02 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303262 Log: - remove 'UNC' from the target Changed paths: U php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c U php/php-src/trunk/TSRM/tsrm_virtual_cwd.c Modified: php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c === --- php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c2010-09-10 18:20:43 UTC (rev 303261) +++ php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c2010-09-10 19:21:02 UTC (rev 303262) @@ -249,9 +249,17 @@ /* Skip first 4 characters if they are \??\ */ if(target[0] == '\\' target[1] == '\\' target[2] == '?' target[3] == '\\') { char tmp[MAXPATHLEN]; - + unsigned int offset = 4; dwRet -= 4; - memcpy(tmp, target + 4, dwRet); + + /* \??\UNC\ */ + if (dwRet 7 target[4] == 'U' target[5] == 'N' target[6] == 'C') { + offset += 2; + dwRet -= 2; + target[offset] = '\\'; + } + + memcpy(tmp, target + offset, dwRet); memcpy(target, tmp, dwRet); } } Modified: php/php-src/trunk/TSRM/tsrm_virtual_cwd.c === --- php/php-src/trunk/TSRM/tsrm_virtual_cwd.c 2010-09-10 18:20:43 UTC (rev 303261) +++ php/php-src/trunk/TSRM/tsrm_virtual_cwd.c 2010-09-10 19:21:02 UTC (rev 303262) @@ -249,9 +249,17 @@ /* Skip first 4 characters if they are \??\ */ if(target[0] == '\\' target[1] == '\\' target[2] == '?' target[3] == '\\') { char tmp[MAXPATHLEN]; + unsigned int offset = 4; + dwRet -= 4; - dwRet -= 4; - memcpy(tmp, target + 4, dwRet); + /* \??\UNC\ */ + if (dwRet 7 target[4] == 'U' target[5] == 'N' target[6] == 'C') { + offset += 2; + dwRet -= 2; + target[offset] = '\\'; + } + + memcpy(tmp, target + offset, dwRet); memcpy(target, tmp, dwRet); } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/proc_open.c trunk/ext/standard/proc_open.c
pajoye Wed, 08 Sep 2010 08:34:57 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303163 Log: - Fix #50524, proc_open should respect cwd as it does on other platforms Bug: http://bugs.php.net/50524 (Assigned) proc_open is using a wrong initial working dir Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/standard/proc_open.c U php/php-src/trunk/ext/standard/proc_open.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-09-08 07:52:49 UTC (rev 303162) +++ php/php-src/branches/PHP_5_3/NEWS 2010-09-08 08:34:57 UTC (rev 303163) @@ -75,6 +75,8 @@ (a_jelly_doughnut at phpbb dot com, Pierre) - Fixed #50953, socket will not connect to IPv4 address when the host has both IPv4 and IPv6 addresses, on Windows. (Gustavo, Pierre) +- Fixed #50524, proc_open on Windows does not respect cwd as it does on other + platforms. (Pierre) 22 Jul 2010, PHP 5.3.3 - Upgraded bundled sqlite to version 3.6.23.1. (Ilia) Modified: php/php-src/branches/PHP_5_3/ext/standard/proc_open.c === --- php/php-src/branches/PHP_5_3/ext/standard/proc_open.c 2010-09-08 07:52:49 UTC (rev 303162) +++ php/php-src/branches/PHP_5_3/ext/standard/proc_open.c 2010-09-08 08:34:57 UTC (rev 303163) @@ -752,6 +752,16 @@ } #ifdef PHP_WIN32 + if (cwd == NULL) { + char cur_cwd[MAXPATHLEN]; + char *getcwd_result; + getcwd_result = VCWD_GETCWD(cur_cwd, MAXPATHLEN); + if (!getcwd_result) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Cannot get current directory); + goto exit_fail; + } + } + memset(si, 0, sizeof(si)); si.cb = sizeof(si); si.dwFlags = STARTF_USESTDHANDLES; Modified: php/php-src/trunk/ext/standard/proc_open.c === --- php/php-src/trunk/ext/standard/proc_open.c 2010-09-08 07:52:49 UTC (rev 303162) +++ php/php-src/trunk/ext/standard/proc_open.c 2010-09-08 08:34:57 UTC (rev 303163) @@ -677,6 +677,16 @@ } #ifdef PHP_WIN32 + if (cwd == NULL) { + char cur_cwd[MAXPATHLEN]; + char *getcwd_result; + getcwd_result = VCWD_GETCWD(cur_cwd, MAXPATHLEN); + if (!getcwd_result) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Cannot get current directory); + goto exit_fail; + } + } + memset(si, 0, sizeof(si)); si.cb = sizeof(si); si.dwFlags = STARTF_USESTDHANDLES; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/standard/ proc_open.c
pajoye Wed, 08 Sep 2010 09:11:18 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303164 Log: - WS Changed paths: U php/php-src/trunk/ext/standard/proc_open.c Modified: php/php-src/trunk/ext/standard/proc_open.c === --- php/php-src/trunk/ext/standard/proc_open.c 2010-09-08 08:34:57 UTC (rev 303163) +++ php/php-src/trunk/ext/standard/proc_open.c 2010-09-08 09:11:18 UTC (rev 303164) @@ -119,7 +119,7 @@ } sizeenv += el_len+1; - + switch (zend_hash_get_current_key_ex(target_hash, string_key, string_length, num_key, 0, pos)) { case HASH_KEY_IS_STRING: if (string_length == 0) { @@ -220,7 +220,6 @@ } #ifdef PHP_WIN32 - WaitForSingleObject(proc-childHandle, INFINITE); GetExitCodeProcess(proc-childHandle, wstatus); FG(pclose_ret) = wstatus; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/main/network.c trunk/main/network.c
pajoye Wed, 08 Sep 2010 10:25:40 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303166 Log: - Fix bug #52323, return value of php_network_connect_socket should be set even if the caller does not care about the error_string Bug: http://bugs.php.net/52323 (Feedback) php_network_connect_socket doesn't return all errors correctly Changed paths: U php/php-src/branches/PHP_5_3/main/network.c U php/php-src/trunk/main/network.c Modified: php/php-src/branches/PHP_5_3/main/network.c === --- php/php-src/branches/PHP_5_3/main/network.c 2010-09-08 09:57:20 UTC (rev 303165) +++ php/php-src/branches/PHP_5_3/main/network.c 2010-09-08 10:25:40 UTC (rev 303166) @@ -377,8 +377,10 @@ } if (error error_string) { - *error_string = php_socket_strerror(error, NULL, 0); ret = -1; + if (error_string) { + *error_string = php_socket_strerror(error, NULL, 0); + } } return ret; #else Modified: php/php-src/trunk/main/network.c === --- php/php-src/trunk/main/network.c2010-09-08 09:57:20 UTC (rev 303165) +++ php/php-src/trunk/main/network.c2010-09-08 10:25:40 UTC (rev 303166) @@ -377,8 +377,10 @@ } if (error error_string) { - *error_string = php_socket_strerror(error, NULL, 0); ret = -1; + if (error_string) { + *error_string = php_socket_strerror(error, NULL, 0); + } } return ret; #else -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/main/network.c trunk/main/network.c
pajoye Wed, 08 Sep 2010 10:26:59 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303167 Log: - WS Changed paths: U php/php-src/branches/PHP_5_3/main/network.c U php/php-src/trunk/main/network.c Modified: php/php-src/branches/PHP_5_3/main/network.c === --- php/php-src/branches/PHP_5_3/main/network.c 2010-09-08 10:25:40 UTC (rev 303166) +++ php/php-src/branches/PHP_5_3/main/network.c 2010-09-08 10:26:59 UTC (rev 303167) @@ -125,7 +125,7 @@ {EAI_MEMORY, Memory allocation failure}, # ifdef EAI_NODATA {EAI_NODATA, No address associated with hostname}, -# endif +# endif {EAI_NONAME, Name or service not known}, {EAI_SERVICE, Servname not supported for ai_socktype}, {EAI_SOCKTYPE, ai_socktype not supported}, @@ -139,7 +139,7 @@ return (char *)values[i].msg; } } - + return Unknown error; } /* }}} */ @@ -182,10 +182,10 @@ } #if HAVE_GETADDRINFO memset(hints, '\0', sizeof(hints)); - + hints.ai_family = AF_INET; /* default to regular inet (see below) */ hints.ai_socktype = socktype; - + # if HAVE_IPV6 /* probe for a working IPv6 stack; even if detected as having v6 at compile * time, at runtime some stacks are slow to resolve or have other issues @@ -228,17 +228,17 @@ sai = res; for (n = 1; (sai = sai-ai_next) != NULL; n++) ; - + *sal = safe_emalloc((n + 1), sizeof(*sal), 0); sai = res; sap = *sal; - + do { *sap = emalloc(sai-ai_addrlen); memcpy(*sap, sai-ai_addr, sai-ai_addrlen); sap++; } while ((sai = sai-ai_next) != NULL); - + freeaddrinfo(res); #else if (!inet_aton(host, in)) { @@ -313,7 +313,7 @@ int ret = 0; SET_SOCKET_BLOCKING_MODE(sockfd, orig_flags); - + if ((n = connect(sockfd, addr, addrlen)) != 0) { error = php_socket_errno(); @@ -459,14 +459,14 @@ if (sa) { /* attempt to bind */ - + #ifdef SO_REUSEADDR { int val = 1; setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char*)val, sizeof(val)); } #endif - + n = bind(sock, sa, socklen); if (n != SOCK_CONN_ERR) { @@ -486,13 +486,13 @@ if (error_string) { *error_string = php_socket_strerror(err, NULL, 0); } - + bound: php_network_freeaddresses(psal); - + return sock; - + } /* }}} */ @@ -610,7 +610,7 @@ /* generally not thread safe, but it *is* thread safe under win32 */ buf = inet_ntoa(((struct sockaddr_in*)sa)-sin_addr); if (buf) { - *textaddrlen = spprintf(textaddr, 0, %s:%d, + *textaddrlen = spprintf(textaddr, 0, %s:%d, buf, ntohs(((struct sockaddr_in*)sa)-sin_port)); } @@ -620,7 +620,7 @@ case AF_INET6: buf = (char*)inet_ntop(sa-sa_family, ((struct sockaddr_in6*)sa)-sin6_addr, (char *)abuf, sizeof(abuf)); if (buf) { - *textaddrlen = spprintf(textaddr, 0, %s:%d, + *textaddrlen = spprintf(textaddr, 0, %s:%d, buf, ntohs(((struct sockaddr_in6*)sa)-sin6_port)); } @@ -651,7 +651,7 @@ } } -PHPAPI int php_network_get_peer_name(php_socket_t sock, +PHPAPI int php_network_get_peer_name(php_socket_t sock, char **textaddr, long *textaddrlen, struct sockaddr **addr, socklen_t *addrlen @@ -660,7 +660,7 @@ php_sockaddr_storage sa; socklen_t sl = sizeof(sa); memset(sa, 0, sizeof(sa)); - + if (getpeername(sock, (struct sockaddr*)sa, sl) == 0) { php_network_populate_name_from_sockaddr((struct sockaddr*)sa, sl, textaddr, textaddrlen, @@ -671,7 +671,7 @@ return -1; } -PHPAPI int php_network_get_sock_name(php_socket_t sock, +PHPAPI int php_network_get_sock_name(php_socket_t sock, char **textaddr, long *textaddrlen, struct sockaddr **addr, socklen_t *addrlen @@ -680,7 +680,7 @@ php_sockaddr_storage sa; socklen_t sl = sizeof(sa); memset(sa, 0, sizeof(sa)); - + if (getsockname(sock, (struct sockaddr*)sa, sl) == 0) { php_network_populate_name_from_sockaddr((struct sockaddr*)sa, sl, textaddr, textaddrlen, @@ -715,7 +715,7 @@ int error = 0, n; php_sockaddr_storage sa; socklen_t sl; - + n = php_pollfd_for(srvsock, PHP_POLLREADABLE, timeout); if (n == 0) { @@ -736,20 +736,20 @@ error = php_socket_errno(); } } - + if (error_code) { *error_code = error; } if (error_string) { *error_string = php_socket_strerror(error, NULL, 0); } - + return clisock; } /* }}} */ - + /* Connect to a remote host using an interruptible connect with optional timeout. * Optionally, the connect can be made asynchronously, which will implicitly * enable non-blocking mode on the socket. @@ -759,7 +759,7 @@ /* {{{ php_network_connect_socket_to_host */ php_socket_t php_network_connect_socket_to_host(const char *host, unsigned short port, int socktype, int asynchronous, struct timeval *timeout, char **error_string, - int *error_code, char *bindto, unsigned short
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/main/network.c trunk/main/network.c
pajoye Wed, 08 Sep 2010 11:51:11 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303172 Log: - fix the fix for bug #52323 Bug: http://bugs.php.net/52323 (Feedback) php_network_connect_socket doesn't return all errors correctly Changed paths: U php/php-src/branches/PHP_5_3/main/network.c U php/php-src/trunk/main/network.c Modified: php/php-src/branches/PHP_5_3/main/network.c === --- php/php-src/branches/PHP_5_3/main/network.c 2010-09-08 11:47:10 UTC (rev 303171) +++ php/php-src/branches/PHP_5_3/main/network.c 2010-09-08 11:51:11 UTC (rev 303172) @@ -376,7 +376,7 @@ *error_code = error; } - if (error error_string) { + if (error) { ret = -1; if (error_string) { *error_string = php_socket_strerror(error, NULL, 0); Modified: php/php-src/trunk/main/network.c === --- php/php-src/trunk/main/network.c2010-09-08 11:47:10 UTC (rev 303171) +++ php/php-src/trunk/main/network.c2010-09-08 11:51:11 UTC (rev 303172) @@ -376,7 +376,7 @@ *error_code = error; } - if (error error_string) { + if (error) { ret = -1; if (error_string) { *error_string = php_socket_strerror(error, NULL, 0); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/main/network.c trunk/main/network.c
pajoye Tue, 07 Sep 2010 09:47:36 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303129 Log: - fix bug #50953, socket will not connect to IPv4 address when the host has both ipv4 and ipv6 addresses Bug: http://bugs.php.net/50953 (Assigned) fsockopen will not work on 'localhost' Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/main/network.c U php/php-src/trunk/main/network.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-09-07 04:40:24 UTC (rev 303128) +++ php/php-src/branches/PHP_5_3/NEWS 2010-09-07 09:47:36 UTC (rev 303129) @@ -72,6 +72,8 @@ - Fixed bug #50481 (Storing many SPLFixedArray in an array crashes). (Felipe) - Fixed bug #52260 (dns_get_record fails with non-existing domain on Windows). (a_jelly_doughnut at phpbb dot com, Pierre) +- Fixed #50953, socket will not connect to IPv4 address when the host has both + IPv4 and IPv6 addresses, on Windows. (Gustavo, Pierre) 22 Jul 2010, PHP 5.3.3 - Upgraded bundled sqlite to version 3.6.23.1. (Ilia) Modified: php/php-src/branches/PHP_5_3/main/network.c === --- php/php-src/branches/PHP_5_3/main/network.c 2010-09-07 04:40:24 UTC (rev 303128) +++ php/php-src/branches/PHP_5_3/main/network.c 2010-09-07 09:47:36 UTC (rev 303129) @@ -206,7 +206,7 @@ } hints.ai_family = ipv6_borked ? AF_INET : AF_UNSPEC; # endif - + if ((n = getaddrinfo(host, NULL, hints, res))) { if (error_string) { spprintf(error_string, 0, php_network_getaddresses: getaddrinfo failed: %s, PHP_GAI_STRERROR(n)); @@ -337,9 +337,19 @@ if (n == 0) { goto ok; } - +# ifdef PHP_WIN32 + /* The documentation for connect() says in case of non-blocking connections +* the select function reports success in the writefds set and failure in +* the exceptfds set. Indeed, using PHP_POLLREADABLE results in select +* failing only due to the timeout and not immediately as would be +* exepected when a connection is actively refused. This way, +* php_pollfd_for will return a mask with POLLOUT if the connection +* is successful and with POLLPRI otherwise. */ + if ((n = php_pollfd_for(sockfd, POLLOUT|POLLPRI, timeout)) == 0) { +#else if ((n = php_pollfd_for(sockfd, PHP_POLLREADABLE|POLLOUT, timeout)) == 0) { error = PHP_TIMEOUT_ERROR_VALUE; +#endif } if (n 0) { Modified: php/php-src/trunk/main/network.c === --- php/php-src/trunk/main/network.c2010-09-07 04:40:24 UTC (rev 303128) +++ php/php-src/trunk/main/network.c2010-09-07 09:47:36 UTC (rev 303129) @@ -337,9 +337,19 @@ if (n == 0) { goto ok; } - +# ifdef PHP_WIN32 + /* The documentation for connect() says in case of non-blocking connections +* the select function reports success in the writefds set and failure in +* the exceptfds set. Indeed, using PHP_POLLREADABLE results in select +* failing only due to the timeout and not immediately as would be +* exepected when a connection is actively refused. This way, +* php_pollfd_for will return a mask with POLLOUT if the connection +* is successful and with POLLPRI otherwise. */ + if ((n = php_pollfd_for(sockfd, POLLOUT|POLLPRI, timeout)) == 0) { +#else if ((n = php_pollfd_for(sockfd, PHP_POLLREADABLE|POLLOUT, timeout)) == 0) { error = PHP_TIMEOUT_ERROR_VALUE; +#endif } if (n 0) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/proc_open.c trunk/ext/standard/proc_open.c
pajoye Mon, 06 Sep 2010 10:28:04 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303067 Log: - kill warning Changed paths: U php/php-src/branches/PHP_5_3/ext/standard/proc_open.c U php/php-src/trunk/ext/standard/proc_open.c Modified: php/php-src/branches/PHP_5_3/ext/standard/proc_open.c === --- php/php-src/branches/PHP_5_3/ext/standard/proc_open.c 2010-09-06 06:44:28 UTC (rev 303066) +++ php/php-src/branches/PHP_5_3/ext/standard/proc_open.c 2010-09-06 10:28:04 UTC (rev 303067) @@ -205,7 +205,7 @@ } } - assert(p - env.envp = sizeenv); + assert((uint)(p - env.envp) = sizeenv); zend_hash_internal_pointer_reset_ex(target_hash, pos); Modified: php/php-src/trunk/ext/standard/proc_open.c === --- php/php-src/trunk/ext/standard/proc_open.c 2010-09-06 06:44:28 UTC (rev 303066) +++ php/php-src/trunk/ext/standard/proc_open.c 2010-09-06 10:28:04 UTC (rev 303067) @@ -177,7 +177,7 @@ } } - assert(p - env.envp = sizeenv); + assert((uint)(p - env.envp) = sizeenv); zend_hash_internal_pointer_reset_ex(target_hash, pos); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/streamsfuncs.c trunk/ext/standard/streamsfuncs.c
pajoye Mon, 06 Sep 2010 10:39:26 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303068 Log: - timeval element are always 32bit long on Windows Changed paths: U php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c U php/php-src/trunk/ext/standard/streamsfuncs.c Modified: php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c === --- php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c2010-09-06 10:28:04 UTC (rev 303067) +++ php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c2010-09-06 10:39:26 UTC (rev 303068) @@ -116,9 +116,13 @@ /* prepare the timeout value for use */ conv = (php_timeout_ull) (timeout * 100.0); +#ifdef PHP_WIN32 + tv.tv_sec = (long)(conv / 100); + tv.tv_usec =(long)(conv % 100); +#else tv.tv_sec = conv / 100; tv.tv_usec = conv % 100; - +#endif if (zerrno) { zval_dtor(zerrno); ZVAL_LONG(zerrno, 0); @@ -258,9 +262,13 @@ /* prepare the timeout value for use */ conv = (php_timeout_ull) (timeout * 100.0); +#ifdef PHP_WIN32 + tv.tv_sec = (long)(conv / 100); + tv.tv_usec = (long)(conv % 100); +#else tv.tv_sec = conv / 100; tv.tv_usec = conv % 100; - +#endif if (zpeername) { zval_dtor(zpeername); ZVAL_NULL(zpeername); Modified: php/php-src/trunk/ext/standard/streamsfuncs.c === --- php/php-src/trunk/ext/standard/streamsfuncs.c 2010-09-06 10:28:04 UTC (rev 303067) +++ php/php-src/trunk/ext/standard/streamsfuncs.c 2010-09-06 10:39:26 UTC (rev 303068) @@ -116,9 +116,13 @@ /* prepare the timeout value for use */ conv = (php_timeout_ull) (timeout * 100.0); +#ifdef PHP_WIN32 + tv.tv_sec = (long)(conv / 100); + tv.tv_usec =(long)(conv % 100); +#else tv.tv_sec = conv / 100; tv.tv_usec = conv % 100; - +#endif if (zerrno) { zval_dtor(zerrno); ZVAL_LONG(zerrno, 0); @@ -258,9 +262,13 @@ /* prepare the timeout value for use */ conv = (php_timeout_ull) (timeout * 100.0); +#ifdef PHP_WIN32 + tv.tv_sec = (long)(conv / 100); + tv.tv_usec = (long)(conv % 100); +#else tv.tv_sec = conv / 100; tv.tv_usec = conv % 100; - +#endif if (zpeername) { zval_dtor(zpeername); ZVAL_NULL(zpeername); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/dns_win32.c trunk/ext/standard/dns_win32.c
pajoye Mon, 06 Sep 2010 10:57:42 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303069 Log: - fix bug #52260, catch all DNS not found error Bug: http://bugs.php.net/52260 (Assigned) Windows implementation of dns_get_record fails with non-existing domain Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/standard/dns_win32.c U php/php-src/trunk/ext/standard/dns_win32.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-09-06 10:39:26 UTC (rev 303068) +++ php/php-src/branches/PHP_5_3/NEWS 2010-09-06 10:57:42 UTC (rev 303069) @@ -67,6 +67,8 @@ - Fixed bug #50590 (IntlDateFormatter::parse result is limited to the integer range). (Stas) - Fixed bug #50481 (Storing many SPLFixedArray in an array crashes). (Felipe) +- Fixed bug #52260 (dns_get_record fails with non-existing domain on Windows). + (a_jelly_doughnut at phpbb dot com, Pierre) 22 Jul 2010, PHP 5.3.3 - Upgraded bundled sqlite to version 3.6.23.1. (Ilia) Modified: php/php-src/branches/PHP_5_3/ext/standard/dns_win32.c === --- php/php-src/branches/PHP_5_3/ext/standard/dns_win32.c 2010-09-06 10:39:26 UTC (rev 303068) +++ php/php-src/branches/PHP_5_3/ext/standard/dns_win32.c 2010-09-06 10:57:42 UTC (rev 303069) @@ -418,7 +418,7 @@ status = DnsQuery_A(hostname, type_to_fetch, DNS_QUERY_STANDARD, NULL, pResult, NULL); if (status) { - if (status == DNS_INFO_NO_RECORDS) { + if (status == DNS_INFO_NO_RECORDS || status == DNS_ERROR_RCODE_NAME_ERROR) { continue; } else { php_error_docref(NULL TSRMLS_CC, E_WARNING, Dns Query failed); Modified: php/php-src/trunk/ext/standard/dns_win32.c === --- php/php-src/trunk/ext/standard/dns_win32.c 2010-09-06 10:39:26 UTC (rev 303068) +++ php/php-src/trunk/ext/standard/dns_win32.c 2010-09-06 10:57:42 UTC (rev 303069) @@ -420,7 +420,7 @@ status = DnsQuery_A(hostname, type_to_fetch, DNS_QUERY_STANDARD, NULL, pResult, NULL); if (status) { - if (status == DNS_INFO_NO_RECORDS) { + if (status == DNS_INFO_NO_RECORDS || status == DNS_ERROR_RCODE_NAME_ERROR) { continue; } else { php_error_docref(NULL TSRMLS_CC, E_WARNING, Dns Query failed); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/standard/ dns_win32.c
pajoye Mon, 06 Sep 2010 14:43:44 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303080 Log: - WS Changed paths: U php/php-src/trunk/ext/standard/dns_win32.c Modified: php/php-src/trunk/ext/standard/dns_win32.c === --- php/php-src/trunk/ext/standard/dns_win32.c 2010-09-06 14:43:32 UTC (rev 303079) +++ php/php-src/trunk/ext/standard/dns_win32.c 2010-09-06 14:43:44 UTC (rev 303080) @@ -124,8 +124,6 @@ status = DnsQuery_A(hostname, type, DNS_QUERY_STANDARD, NULL, pResult, NULL); - - if (status) { RETURN_FALSE; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS
pajoye Mon, 06 Sep 2010 14:54:43 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303086 Log: - links related fixes Changed paths: U php/php-src/branches/PHP_5_3/NEWS Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-09-06 14:54:23 UTC (rev 303085) +++ php/php-src/branches/PHP_5_3/NEWS 2010-09-06 14:54:43 UTC (rev 303086) @@ -8,6 +8,7 @@ (Pierre) - Added new character sets to mysqlnd, which are available in MySQL 5.5 (Andrey) +- Improved support for is_link and related functions on Windows. (Pierre) - Fixed symbolic resolution support when the target is a DFS share. (Pierre) - Fixed MOPS-2010-24, fix string validation. (CVE-2010-2950). (Pierre) @@ -61,6 +62,8 @@ - Fixed bug #52302 (mysqli_fetch_all does not work with MYSQLI_USE_RESULT). (Andrey) - Fixed bug #52221 (Misbehaviour of magic_quotes_runtime (get/set)). (Andrey) +- Fixed bug #51763 (SplFileInfo::getType() does not work symbolic link + and directory). (Pierre) - Fixed bug #51610 (Using oci_connect causes PHP to take a long time to exit). Requires Oracle bug fix 9891199 for this patch to have an effect. (Oracle Corp.) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mbstring/tests/mb_decode_mimeheader_variation1.phpt trunk/ext/mbstring/tests/mb_decode_mimeheader_variation1.phpt
pajoye Sun, 05 Sep 2010 14:38:35 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303055 Log: - restore credits, fix 5.3 as well, aka do it right /cc Deric Changed paths: U php/php-src/branches/PHP_5_3/ext/mbstring/tests/mb_decode_mimeheader_variation1.phpt U php/php-src/trunk/ext/mbstring/tests/mb_decode_mimeheader_variation1.phpt Modified: php/php-src/branches/PHP_5_3/ext/mbstring/tests/mb_decode_mimeheader_variation1.phpt === --- php/php-src/branches/PHP_5_3/ext/mbstring/tests/mb_decode_mimeheader_variation1.phpt 2010-09-05 13:32:31 UTC (rev 303054) +++ php/php-src/branches/PHP_5_3/ext/mbstring/tests/mb_decode_mimeheader_variation1.phpt 2010-09-05 14:38:35 UTC (rev 303055) @@ -1,10 +1,7 @@ --TEST-- -p8_only -Title: Test mb_decode_mimeheader() function : usage variation -Internal Reason: we output an extra warning message -P8 only feature: Yes -Author: D. Kelsey -Date: 01/09/2008 +Test mb_decode_mimeheader() function : usage variation +--CREDITS-- +D. Kesley --SKIPIF-- ?php extension_loaded('mbstring') or die('skip'); Modified: php/php-src/trunk/ext/mbstring/tests/mb_decode_mimeheader_variation1.phpt === --- php/php-src/trunk/ext/mbstring/tests/mb_decode_mimeheader_variation1.phpt 2010-09-05 13:32:31 UTC (rev 303054) +++ php/php-src/trunk/ext/mbstring/tests/mb_decode_mimeheader_variation1.phpt 2010-09-05 14:38:35 UTC (rev 303055) @@ -1,5 +1,7 @@ --TEST-- Test mb_decode_mimeheader() function : usage variation +--CREDITS-- +D. Kesley --SKIPIF-- ?php extension_loaded('mbstring') or die('skip'); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ UPGRADING.INTERNALS
pajoye Thu, 02 Sep 2010 10:30:34 + Revision: http://svn.php.net/viewvc?view=revisionrevision=302994 Log: - typo/clarity Changed paths: U php/php-src/trunk/UPGRADING.INTERNALS Modified: php/php-src/trunk/UPGRADING.INTERNALS === --- php/php-src/trunk/UPGRADING.INTERNALS 2010-09-02 05:57:52 UTC (rev 302993) +++ php/php-src/trunk/UPGRADING.INTERNALS 2010-09-02 10:30:34 UTC (rev 302994) @@ -16,7 +16,7 @@ b. stat/lstat support -php_sys_lstat is now available on all platforms. On unix-like platform +lstat is now available on all platforms. On unix-like platform php_sys_lstat is an alias to lstat (when avaible). On Windows it is now available using php_sys_lstat. php_sys_stat and php_sys_lstat usage is recommended instead of calling lstat directly, to ensure portability. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ UPGRADING.INTERNALS
pajoye Thu, 02 Sep 2010 10:32:32 + Revision: http://svn.php.net/viewvc?view=revisionrevision=302995 Log: - add it for 5.3 as well Changed paths: A php/php-src/branches/PHP_5_3/UPGRADING.INTERNALS Added: php/php-src/branches/PHP_5_3/UPGRADING.INTERNALS === --- php/php-src/branches/PHP_5_3/UPGRADING.INTERNALS (rev 0) +++ php/php-src/branches/PHP_5_3/UPGRADING.INTERNALS2010-09-02 10:32:32 UTC (rev 302995) @@ -0,0 +1,16 @@ +$Id$ + +UPGRADE NOTES - PHP 5.3.4 + +1. Internal API changes + + +1. Internal API changes + + + b. stat/lstat support + +lstat is now available on all platforms. On unix-like platform +php_sys_lstat is an alias to lstat (when avaible). On Windows it is now +available using php_sys_lstat. php_sys_stat and php_sys_lstat usage is recommended +instead of calling lstat directly, to ensure portability. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h branches/PHP_5_3/main/streams/plain_wrapper.c branches/PHP_5_3/main/win95nt.h trunk/TSRM/
pajoye Wed, 01 Sep 2010 09:49:53 + Revision: http://svn.php.net/viewvc?view=revisionrevision=302966 Log: - add lstat support for Windows Changed paths: U php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c U php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h U php/php-src/branches/PHP_5_3/main/streams/plain_wrapper.c U php/php-src/branches/PHP_5_3/main/win95nt.h U php/php-src/trunk/TSRM/tsrm_virtual_cwd.c U php/php-src/trunk/TSRM/tsrm_virtual_cwd.h U php/php-src/trunk/main/streams/plain_wrapper.c U php/php-src/trunk/main/streams/streams.c U php/php-src/trunk/main/win95nt.h Modified: php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c === --- php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c 2010-09-01 08:17:18 UTC (rev 302965) +++ php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.c 2010-09-01 09:49:53 UTC (rev 302966) @@ -14,6 +14,7 @@ +--+ | Authors: Andi Gutmans a...@zend.com| | Sascha Schumann sas...@schumann.cx| + | Pierre Joye pie...@php.net| +--+ */ @@ -40,6 +41,10 @@ # endif #endif +#ifndef S_IFLNK +# define S_IFLNK 012 +#endif + #ifdef NETWARE #include fsio.h #endif @@ -202,7 +207,7 @@ return (time_t)UnixTime; } -CWD_API int php_sys_stat(const char *path, struct stat *buf) /* {{{ */ +CWD_API int php_sys_stat_ex(const char *path, struct stat *buf, int lstat) /* {{{ */ { WIN32_FILE_ATTRIBUTE_DATA data; __int64 t; @@ -247,9 +252,46 @@ free(tmp); } } + buf-st_uid = buf-st_gid = buf-st_ino = 0; - buf-st_mode = (data.dwFileAttributes FILE_ATTRIBUTE_DIRECTORY) ? (S_IFDIR|S_IEXEC|(S_IEXEC3)|(S_IEXEC6)) : S_IFREG; - buf-st_mode |= (data.dwFileAttributes FILE_ATTRIBUTE_READONLY) ? (S_IREAD|(S_IREAD3)|(S_IREAD6)) : (S_IREAD|(S_IREAD3)|(S_IREAD6)|S_IWRITE|(S_IWRITE3)|(S_IWRITE6)); + + if (lstat data.dwFileAttributes FILE_ATTRIBUTE_REPARSE_POINT) { + /* File is a reparse point. Get the target */ + HANDLE hLink = NULL; + REPARSE_DATA_BUFFER * pbuffer; + unsigned int retlength = 0; + TSRM_ALLOCA_FLAG(use_heap_large); + + hLink = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_FLAG_OPEN_REPARSE_POINT|FILE_FLAG_BACKUP_SEMANTICS, NULL); + if(hLink == INVALID_HANDLE_VALUE) { + return -1; + } + + pbuffer = (REPARSE_DATA_BUFFER *)tsrm_do_alloca(MAXIMUM_REPARSE_DATA_BUFFER_SIZE, use_heap_large); + if(!DeviceIoControl(hLink, FSCTL_GET_REPARSE_POINT, NULL, 0, pbuffer, MAXIMUM_REPARSE_DATA_BUFFER_SIZE, retlength, NULL)) { + tsrm_free_alloca(pbuffer, use_heap_large); + CloseHandle(hLink); + return -1; + } + + CloseHandle(hLink); + + if(pbuffer-ReparseTag == IO_REPARSE_TAG_SYMLINK) { + buf-st_mode = S_IFLNK; + buf-st_mode |= (data.dwFileAttributes FILE_ATTRIBUTE_READONLY) ? (S_IREAD|(S_IREAD3)|(S_IREAD6)) : (S_IREAD|(S_IREAD3)|(S_IREAD6)|S_IWRITE|(S_IWRITE3)|(S_IWRITE6)); + } + +#if 0 /* Not used yet */ + else if(pbuffer-ReparseTag == IO_REPARSE_TAG_MOUNT_POINT) { + buf-st_mode |=; + } +#endif + tsrm_free_alloca(pbuffer, use_heap_large); + } else { + buf-st_mode = (data.dwFileAttributes FILE_ATTRIBUTE_DIRECTORY) ? (S_IFDIR|S_IEXEC|(S_IEXEC3)|(S_IEXEC6)) : S_IFREG; + buf-st_mode |= (data.dwFileAttributes FILE_ATTRIBUTE_READONLY) ? (S_IREAD|(S_IREAD3)|(S_IREAD6)) : (S_IREAD|(S_IREAD3)|(S_IREAD6)|S_IWRITE|(S_IWRITE3)|(S_IWRITE6)); + } + if ((data.dwFileAttributes FILE_ATTRIBUTE_DIRECTORY) == 0) { int len = strlen(path); @@ -715,8 +757,8 @@ memcpy(tmp, path, len+1); if(save - !(IS_UNC_PATH(path, len) len = 3 path[2] != '?') - (data.dwFileAttributes FILE_ATTRIBUTE_REPARSE_POINT)) { +!(IS_UNC_PATH(path, len) len = 3 path[2] != '?') +(data.dwFileAttributes FILE_ATTRIBUTE_REPARSE_POINT)) { /* File is a reparse point. Get the target */ HANDLE hLink = NULL; REPARSE_DATA_BUFFER * pbuffer; @@ -1209,7 +1251,7 @@ if (length == 0) { return 1; /* Can't cd to empty string */ - } + } while(--length = 0 !IS_SLASH(path[length])) { } @@ -1558,7 +1600,6 @@ } /* }}} */ -#if !defined(TSRM_WIN32) CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC) /* {{{ */ { cwd_state new_state; @@ -1570,13 +1611,12 @@ return -1; } - retval = lstat(new_state.cwd, buf); + retval = php_sys_lstat(new_state.cwd, buf); CWD_STATE_FREE(new_state); return retval; } /* }}} */ -#endif CWD_API int virtual_unlink(const char *path TSRMLS_DC) /* {{{ */ { Modified: php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h === --- php/php-src/branches/PHP_5_3/TSRM/tsrm_virtual_cwd.h 2010-09-01 08:17:18 UTC (rev 302965
[PHP-CVS] svn: /php/php-src/trunk/ UPGRADING.INTERNALS
pajoye Wed, 01 Sep 2010 09:54:45 + Revision: http://svn.php.net/viewvc?view=revisionrevision=302967 Log: - upgrading addition about stat/lstat Changed paths: U php/php-src/trunk/UPGRADING.INTERNALS Modified: php/php-src/trunk/UPGRADING.INTERNALS === --- php/php-src/trunk/UPGRADING.INTERNALS 2010-09-01 09:49:53 UTC (rev 302966) +++ php/php-src/trunk/UPGRADING.INTERNALS 2010-09-01 09:54:45 UTC (rev 302967) @@ -8,6 +8,15 @@ 1. Internal API changes + a. virtual_file_ex + virtual_file_ex takes now a TSRM context as last parameter: CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path, int use_realpath TSRLS_DC); + + b. stat/lstat support + +php_sys_lstat is now available on all platforms. On unix-like platform +php_sys_lstat is an alias to lstat (when avaible). On Windows it is now +available using php_sys_lstat. php_sys_stat and php_sys_lstat usage is recommended +instead of calling lstat directly, to ensure portability. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/main/streams/ plain_wrapper.c
pajoye Wed, 01 Sep 2010 10:13:46 + Revision: http://svn.php.net/viewvc?view=revisionrevision=302969 Log: - sb needed only in safemode Changed paths: U php/php-src/branches/PHP_5_3/main/streams/plain_wrapper.c Modified: php/php-src/branches/PHP_5_3/main/streams/plain_wrapper.c === --- php/php-src/branches/PHP_5_3/main/streams/plain_wrapper.c 2010-09-01 10:03:06 UTC (rev 302968) +++ php/php-src/branches/PHP_5_3/main/streams/plain_wrapper.c 2010-09-01 10:13:46 UTC (rev 302969) @@ -1306,7 +1306,6 @@ char *pathbuf, *ptr, *end; char *exec_fname; char trypath[MAXPATHLEN]; - struct stat sb; php_stream *stream; int path_length; int filename_length; @@ -1448,6 +1447,8 @@ } if (PG(safe_mode)) { + struct stat sb; + if (VCWD_STAT(trypath, sb) == 0) { /* file exists ... check permission */ if ((php_check_safe_mode_include_dir(trypath TSRMLS_CC) == 0) || -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/main/streams/plain_wrapper.c trunk/main/streams/plain_wrapper.c
pajoye Wed, 01 Sep 2010 10:16:48 + Revision: http://svn.php.net/viewvc?view=revisionrevision=302970 Log: - WS Changed paths: U php/php-src/branches/PHP_5_3/main/streams/plain_wrapper.c U php/php-src/trunk/main/streams/plain_wrapper.c Modified: php/php-src/branches/PHP_5_3/main/streams/plain_wrapper.c === --- php/php-src/branches/PHP_5_3/main/streams/plain_wrapper.c 2010-09-01 10:13:46 UTC (rev 302969) +++ php/php-src/branches/PHP_5_3/main/streams/plain_wrapper.c 2010-09-01 10:16:48 UTC (rev 302970) @@ -1147,7 +1147,7 @@ #else php_error_docref2(NULL TSRMLS_CC, url_from, url_to, E_WARNING, %s, strerror(errno)); #endif -return 0; + return 0; } /* Clear stat cache (and realpath cache) */ @@ -1229,7 +1229,7 @@ if (*p == '\0') { *p = DEFAULT_SLASH; if ((*(p+1) != '\0') - (ret = VCWD_MKDIR(buf, (mode_t)mode)) 0) { + (ret = VCWD_MKDIR(buf, (mode_t)mode)) 0) { if (options REPORT_ERRORS) { php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, strerror(errno)); } Modified: php/php-src/trunk/main/streams/plain_wrapper.c === --- php/php-src/trunk/main/streams/plain_wrapper.c 2010-09-01 10:13:46 UTC (rev 302969) +++ php/php-src/trunk/main/streams/plain_wrapper.c 2010-09-01 10:16:48 UTC (rev 302970) @@ -1117,7 +1117,7 @@ #else php_error_docref2(NULL TSRMLS_CC, url_from, url_to, E_WARNING, %s, strerror(errno)); #endif -return 0; + return 0; } /* Clear stat cache (and realpath cache) */ @@ -1199,7 +1199,7 @@ if (*p == '\0') { *p = DEFAULT_SLASH; if ((*(p+1) != '\0') - (ret = VCWD_MKDIR(buf, (mode_t)mode)) 0) { + (ret = VCWD_MKDIR(buf, (mode_t)mode)) 0) { if (options REPORT_ERRORS) { php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, strerror(errno)); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ UPGRADING
pajoye Wed, 01 Sep 2010 10:22:29 + Revision: http://svn.php.net/viewvc?view=revisionrevision=302971 Log: - fix index Changed paths: U php/php-src/trunk/UPGRADING Modified: php/php-src/trunk/UPGRADING === --- php/php-src/trunk/UPGRADING 2010-09-01 10:16:48 UTC (rev 302970) +++ php/php-src/trunk/UPGRADING 2010-09-01 10:22:29 UTC (rev 302971) @@ -16,7 +16,8 @@ 8. Changes in SAPI support 9. Changes in INI directives 10. Syntax additions -11. Windows support +11. Syntax additions +12. Windows support 12. New in PHP X.Y: a. New libraries b. New extensions -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ UPGRADING
pajoye Wed, 01 Sep 2010 10:23:58 + Revision: http://svn.php.net/viewvc?view=revisionrevision=302972 Log: - is_link note Changed paths: U php/php-src/trunk/UPGRADING Modified: php/php-src/trunk/UPGRADING === --- php/php-src/trunk/UPGRADING 2010-09-01 10:22:29 UTC (rev 302971) +++ php/php-src/trunk/UPGRADING 2010-09-01 10:23:58 UTC (rev 302972) @@ -204,7 +204,8 @@ 12. Windows support === -- +- is_link now works properly for symbolic links on Windows Vista + or later. Earlier systems do not support symbolic links. === 13. New in PHP X.Y: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h trunk/ext/mysqlnd/mysqlnd_structs.h
hi Andrey, See http://lxr.php.net/opengrok/xref/PHP_5_3/win32/php_stdint.h it has macros for integer capable to contain a pointer. Cheers, On Wed, Sep 1, 2010 at 6:54 PM, Andrey Hristov and...@php.net wrote: andrey Wed, 01 Sep 2010 16:54:20 + Revision: http://svn.php.net/viewvc?view=revisionrevision=302980 Log: fix build on windows, seems this macro is not defined Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h U php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h === --- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h 2010-09-01 15:34:48 UTC (rev 302979) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h 2010-09-01 16:54:20 UTC (rev 302980) @@ -156,13 +156,7 @@ The ABI will be broken and the methods structure will be somewhere else in the memory which can crash external code. Feel free to reuse these. */ -#if SIZEOF_CHAR_P == 4 - uint32_t unused1; -#elif SIZEOF_CHAR_P == 8 - uint64_t unused1; -#else -#error Not supported platform -#endif + char * unused1; char * unused2; char * unused3; char * unused4; Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h === --- php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h 2010-09-01 15:34:48 UTC (rev 302979) +++ php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h 2010-09-01 16:54:20 UTC (rev 302980) @@ -156,13 +156,7 @@ The ABI will be broken and the methods structure will be somewhere else in the memory which can crash external code. Feel free to reuse these. */ -#if SIZEOF_CHAR_P == 4 - uint32_t unused1; -#elif SIZEOF_CHAR_P == 8 - uint64_t unused1; -#else -#error Not supported platform -#endif + char * unused1; char * unused2; char * unused3; char * unused4; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h trunk/ext/mysqlnd/mysqlnd_structs.h
hi, Yes, understood that. I only pointed you to a place where you can get this value per platform/arch tuple on windows. On Wed, Sep 1, 2010 at 10:00 PM, Andrey Hristov p...@hristov.com wrote: I need to keep the ABI. Currently it is char*, which will be 4 bytes on 32bit, and 8 bytes on 64bit. Therefore, I needed this macro to put the right amount of bytes - uint32_t or uint64_t . Anyway, currently this is unused and can stay as char *. I will look for a solution when I needed to use these members. Thanks for the help offered. Andrey Pierre Joye wrote: hi Andrey, See http://lxr.php.net/opengrok/xref/PHP_5_3/win32/php_stdint.h it has macros for integer capable to contain a pointer. Cheers, On Wed, Sep 1, 2010 at 6:54 PM, Andrey Hristov and...@php.net wrote: andrey Wed, 01 Sep 2010 16:54:20 + Revision: http://svn.php.net/viewvc?view=revisionrevision=302980 Log: fix build on windows, seems this macro is not defined Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h U php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h === --- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h 2010-09-01 15:34:48 UTC (rev 302979) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h 2010-09-01 16:54:20 UTC (rev 302980) @@ -156,13 +156,7 @@ The ABI will be broken and the methods structure will be somewhere else in the memory which can crash external code. Feel free to reuse these. */ -#if SIZEOF_CHAR_P == 4 - uint32_t unused1; -#elif SIZEOF_CHAR_P == 8 - uint64_t unused1; -#else -#error Not supported platform -#endif + char * unused1; char * unused2; char * unused3; char * unused4; Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h === --- php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h 2010-09-01 15:34:48 UTC (rev 302979) +++ php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h 2010-09-01 16:54:20 UTC (rev 302980) @@ -156,13 +156,7 @@ The ABI will be broken and the methods structure will be somewhere else in the memory which can crash external code. Feel free to reuse these. */ -#if SIZEOF_CHAR_P == 4 - uint32_t unused1; -#elif SIZEOF_CHAR_P == 8 - uint64_t unused1; -#else -#error Not supported platform -#endif + char * unused1; char * unused2; char * unused3; char * unused4; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ TSRM/tsrm_virtual_cwd.c TSRM/tsrm_virtual_cwd.h UPGRADING ext/zip/php_zip.c main/fopen_wrappers.c main/php_open_temporary_file.c
pajoye Mon, 30 Aug 2010 09:38:47 + Revision: http://svn.php.net/viewvc?view=revisionrevision=302883 Log: - use TSRMLS_CC instead of TSRMLS_FETCH in virtual_file_ex Changed paths: U php/php-src/trunk/TSRM/tsrm_virtual_cwd.c U php/php-src/trunk/TSRM/tsrm_virtual_cwd.h U php/php-src/trunk/UPGRADING U php/php-src/trunk/ext/zip/php_zip.c U php/php-src/trunk/main/fopen_wrappers.c U php/php-src/trunk/main/php_open_temporary_file.c Modified: php/php-src/trunk/TSRM/tsrm_virtual_cwd.c === --- php/php-src/trunk/TSRM/tsrm_virtual_cwd.c 2010-08-30 09:20:48 UTC (rev 302882) +++ php/php-src/trunk/TSRM/tsrm_virtual_cwd.c 2010-08-30 09:38:47 UTC (rev 302883) @@ -990,7 +990,7 @@ /* Resolve path relatively to state and put the real path into state */ /* returns 0 for ok, 1 for error */ -CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path, int use_realpath) /* {{{ */ +CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path, int use_realpath TSRMLS_DC) /* {{{ */ { int path_length = strlen(path); char resolved_path[MAXPATHLEN]; @@ -1000,7 +1000,6 @@ int ret; int add_slash; void *tmp; - TSRMLS_FETCH(); if (path_length == 0 || path_length = MAXPATHLEN-1) { #ifdef TSRM_WIN32 @@ -1196,7 +1195,7 @@ CWD_API int virtual_chdir(const char *path TSRMLS_DC) /* {{{ */ { - return virtual_file_ex(CWDG(cwd), path, php_is_dir_ok, CWD_REALPATH)?-1:0; + return virtual_file_ex(CWDG(cwd), path, php_is_dir_ok, CWD_REALPATH TSRMLS_CC)?-1:0; } /* }}} */ @@ -1256,7 +1255,7 @@ new_state.cwd_length = 0; } - if (virtual_file_ex(new_state, path, NULL, CWD_REALPATH)==0) { + if (virtual_file_ex(new_state, path, NULL, CWD_REALPATH TSRMLS_CC)==0) { int len = new_state.cwd_lengthMAXPATHLEN-1?MAXPATHLEN-1:new_state.cwd_length; memcpy(real_path, new_state.cwd, len); @@ -1278,7 +1277,7 @@ int retval; CWD_STATE_COPY(new_state, CWDG(cwd)); - retval = virtual_file_ex(new_state, path, verify_path, CWD_FILEPATH); + retval = virtual_file_ex(new_state, path, verify_path, CWD_FILEPATH TSRMLS_CC); *filepath = new_state.cwd; @@ -1303,7 +1302,7 @@ } CWD_STATE_COPY(new_state, CWDG(cwd)); - if (virtual_file_ex(new_state, path, NULL, CWD_FILEPATH)) { + if (virtual_file_ex(new_state, path, NULL, CWD_FILEPATH TSRMLS_CC)) { CWD_STATE_FREE(new_state); return NULL; } @@ -1321,7 +1320,7 @@ int ret; CWD_STATE_COPY(new_state, CWDG(cwd)); - if (virtual_file_ex(new_state, pathname, NULL, CWD_REALPATH)) { + if (virtual_file_ex(new_state, pathname, NULL, CWD_REALPATH TSRMLS_CC)) { CWD_STATE_FREE(new_state); return -1; } @@ -1394,7 +1393,7 @@ int ret; CWD_STATE_COPY(new_state, CWDG(cwd)); - if (virtual_file_ex(new_state, filename, NULL, CWD_REALPATH)) { + if (virtual_file_ex(new_state, filename, NULL, CWD_REALPATH TSRMLS_CC)) { CWD_STATE_FREE(new_state); return -1; } @@ -1417,7 +1416,7 @@ int ret; CWD_STATE_COPY(new_state, CWDG(cwd)); - if (virtual_file_ex(new_state, filename, NULL, CWD_REALPATH)) { + if (virtual_file_ex(new_state, filename, NULL, CWD_REALPATH TSRMLS_CC)) { CWD_STATE_FREE(new_state); return -1; } @@ -1436,7 +1435,7 @@ int ret; CWD_STATE_COPY(new_state, CWDG(cwd)); - if (virtual_file_ex(new_state, filename, NULL, CWD_REALPATH)) { + if (virtual_file_ex(new_state, filename, NULL, CWD_REALPATH TSRMLS_CC)) { CWD_STATE_FREE(new_state); return -1; } @@ -1463,7 +1462,7 @@ int f; CWD_STATE_COPY(new_state, CWDG(cwd)); - if (virtual_file_ex(new_state, path, NULL, CWD_FILEPATH)) { + if (virtual_file_ex(new_state, path, NULL, CWD_FILEPATH TSRMLS_CC)) { CWD_STATE_FREE(new_state); return -1; } @@ -1491,7 +1490,7 @@ int f; CWD_STATE_COPY(new_state, CWDG(cwd)); - if (virtual_file_ex(new_state, path, NULL, CWD_FILEPATH)) { + if (virtual_file_ex(new_state, path, NULL, CWD_FILEPATH TSRMLS_CC)) { CWD_STATE_FREE(new_state); return -1; } @@ -1510,14 +1509,14 @@ int retval; CWD_STATE_COPY(old_state, CWDG(cwd)); - if (virtual_file_ex(old_state, oldname, NULL, CWD_EXPAND)) { + if (virtual_file_ex(old_state, oldname, NULL, CWD_EXPAND TSRMLS_CC)) { CWD_STATE_FREE(old_state); return -1; } oldname = old_state.cwd; CWD_STATE_COPY(new_state, CWDG(cwd)); - if (virtual_file_ex(new_state, newname, NULL, CWD_EXPAND)) { + if (virtual_file_ex(new_state, newname, NULL, CWD_EXPAND TSRMLS_CC)) { CWD_STATE_FREE(old_state); CWD_STATE_FREE(new_state); return -1; @@ -1546,7 +1545,7 @@ int retval; CWD_STATE_COPY(new_state, CWDG(cwd)); - if (virtual_file_ex(new_state, path, NULL, CWD_REALPATH)) { + if (virtual_file_ex(new_state, path, NULL, CWD_REALPATH TSRMLS_CC)) { CWD_STATE_FREE(new_state); return -1; } @@ -1565,7 +1564,7 @@ int retval; CWD_STATE_COPY(new_state, CWDG(cwd)); - if (virtual_file_ex(new_state, path, NULL,
[PHP-CVS] svn: /php/php-src/trunk/ UPGRADING
pajoye Mon, 30 Aug 2010 10:27:03 + Revision: http://svn.php.net/viewvc?view=revisionrevision=302885 Log: - remove internals stuff, moved to the INTERNALS guide Changed paths: U php/php-src/trunk/UPGRADING Modified: php/php-src/trunk/UPGRADING === --- php/php-src/trunk/UPGRADING 2010-08-30 10:26:31 UTC (rev 302884) +++ php/php-src/trunk/UPGRADING 2010-08-30 10:27:03 UTC (rev 302885) @@ -28,7 +28,6 @@ h. New methods i. New class constants j. New hash algorithms -13. Internals API changes 1. Changes made to default configuration @@ -259,10 +258,4 @@ - fnv164 - joaat - -13. Internal API changes - -virtual_file_ex takes now a TSRM context as last parameter: -CWD_API int virtual_file_ex(cwd_state *state, const char *path, - verify_path_func verify_path, int use_realpath TSRLS_DC); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php