[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/ext/spl/php_spl.c branches/PHP_5_4/ext/spl/spl_iterators.h trunk/ext/spl/php_spl.c trunk/ext/spl/spl_iterators.h
salathe Wed, 27 Jul 2011 08:48:08 + Revision: http://svn.php.net/viewvc?view=revisionrevision=313763 Log: added (recursive)callbackfilteriterator to spl_classes() (bug #55287) Bug: https://bugs.php.net/55287 (Open) trunk's spl_classes() not includes CallbackFilter classes Changed paths: U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/ext/spl/php_spl.c U php/php-src/branches/PHP_5_4/ext/spl/spl_iterators.h U php/php-src/trunk/ext/spl/php_spl.c U php/php-src/trunk/ext/spl/spl_iterators.h Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2011-07-27 08:09:24 UTC (rev 313762) +++ php/php-src/branches/PHP_5_4/NEWS 2011-07-27 08:48:08 UTC (rev 313763) @@ -25,6 +25,8 @@ - SPL extension: . Added missing class_uses(..) as pointed out by #55266 (Stefan) + . Fixed bug #55287 (spl_classes() not includes CallbackFilter classes) +(sasezaki at gmail dot com, salathe) 14 Jul 2011, PHP 5.4.0 Alpha 2 Modified: php/php-src/branches/PHP_5_4/ext/spl/php_spl.c === --- php/php-src/branches/PHP_5_4/ext/spl/php_spl.c 2011-07-27 08:09:24 UTC (rev 313762) +++ php/php-src/branches/PHP_5_4/ext/spl/php_spl.c 2011-07-27 08:48:08 UTC (rev 313763) @@ -205,6 +205,7 @@ SPL_ADD_CLASS(BadFunctionCallException, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(BadMethodCallException, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(CachingIterator, z_list, sub, allow, ce_flags); \ + SPL_ADD_CLASS(CallbackFilterIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(Countable, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(DirectoryIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(DomainException, z_list, sub, allow, ce_flags); \ @@ -228,6 +229,7 @@ SPL_ADD_CLASS(RangeException, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(RecursiveArrayIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(RecursiveCachingIterator, z_list, sub, allow, ce_flags); \ + SPL_ADD_CLASS(RecursiveCallbackFilterIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(RecursiveDirectoryIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(RecursiveFilterIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(RecursiveIterator, z_list, sub, allow, ce_flags); \ Modified: php/php-src/branches/PHP_5_4/ext/spl/spl_iterators.h === --- php/php-src/branches/PHP_5_4/ext/spl/spl_iterators.h2011-07-27 08:09:24 UTC (rev 313762) +++ php/php-src/branches/PHP_5_4/ext/spl/spl_iterators.h2011-07-27 08:48:08 UTC (rev 313763) @@ -52,6 +52,8 @@ extern PHPAPI zend_class_entry *spl_ce_RegexIterator; extern PHPAPI zend_class_entry *spl_ce_RecursiveRegexIterator; extern PHPAPI zend_class_entry *spl_ce_Countable; +extern PHPAPI zend_class_entry *spl_ce_CallbackFilterIterator; +extern PHPAPI zend_class_entry *spl_ce_RecursiveCallbackFilterIterator; PHP_MINIT_FUNCTION(spl_iterators); Modified: php/php-src/trunk/ext/spl/php_spl.c === --- php/php-src/trunk/ext/spl/php_spl.c 2011-07-27 08:09:24 UTC (rev 313762) +++ php/php-src/trunk/ext/spl/php_spl.c 2011-07-27 08:48:08 UTC (rev 313763) @@ -205,6 +205,7 @@ SPL_ADD_CLASS(BadFunctionCallException, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(BadMethodCallException, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(CachingIterator, z_list, sub, allow, ce_flags); \ + SPL_ADD_CLASS(CallbackFilterIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(Countable, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(DirectoryIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(DomainException, z_list, sub, allow, ce_flags); \ @@ -228,6 +229,7 @@ SPL_ADD_CLASS(RangeException, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(RecursiveArrayIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(RecursiveCachingIterator, z_list, sub, allow, ce_flags); \ + SPL_ADD_CLASS(RecursiveCallbackFilterIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(RecursiveDirectoryIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(RecursiveFilterIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(RecursiveIterator, z_list, sub, allow, ce_flags); \ Modified: php/php-src/trunk/ext/spl/spl_iterators.h === --- php/php-src/trunk/ext/spl/spl_iterators.h 2011-07-27 08:09:24 UTC (rev 313762) +++ php/php-src/trunk/ext/spl/spl_iterators.h 2011-07-27 08:48:08 UTC (rev 313763) @@ -52,6 +52,8 @@ extern PHPAPI zend_class_entry
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqlnd/mysqlnd.c branches/PHP_5_4/ext/mysqlnd/mysqlnd.c trunk/ext/mysqlnd/mysqlnd.c
andrey Wed, 27 Jul 2011 10:26:59 + Revision: http://svn.php.net/viewvc?view=revisionrevision=313767 Log: longer error messages, don't cut them Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c U php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd.c U php/php-src/trunk/ext/mysqlnd/mysqlnd.c Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c === --- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c 2011-07-27 09:41:33 UTC (rev 313766) +++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c 2011-07-27 10:26:59 UTC (rev 313767) @@ -831,9 +831,9 @@ PACKET_FREE(greet_packet); if (errstr) { - DBG_ERR_FMT([%u] %.64s (trying to connect via %s), errcode, errstr, conn-scheme); + DBG_ERR_FMT([%u] %.128s (trying to connect via %s), errcode, errstr, conn-scheme); SET_CLIENT_ERROR(conn-error_info, errcode? errcode:CR_CONNECTION_ERROR, UNKNOWN_SQLSTATE, errstr); - php_error_docref(NULL TSRMLS_CC, E_WARNING, [%u] %.64s (trying to connect via %s), errcode, errstr, conn-scheme); + php_error_docref(NULL TSRMLS_CC, E_WARNING, [%u] %.128s (trying to connect via %s), errcode, errstr, conn-scheme); /* no mnd_ since we don't allocate it */ efree(errstr); } Modified: php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd.c === --- php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd.c 2011-07-27 09:41:33 UTC (rev 313766) +++ php/php-src/branches/PHP_5_4/ext/mysqlnd/mysqlnd.c 2011-07-27 10:26:59 UTC (rev 313767) @@ -931,9 +931,9 @@ PACKET_FREE(greet_packet); if (errstr) { - DBG_ERR_FMT([%u] %.64s (trying to connect via %s), errcode, errstr, conn-scheme); + DBG_ERR_FMT([%u] %.128s (trying to connect via %s), errcode, errstr, conn-scheme); SET_CLIENT_ERROR(conn-error_info, errcode? errcode:CR_CONNECTION_ERROR, UNKNOWN_SQLSTATE, errstr); - php_error_docref(NULL TSRMLS_CC, E_WARNING, [%u] %.64s (trying to connect via %s), errcode, errstr, conn-scheme); + php_error_docref(NULL TSRMLS_CC, E_WARNING, [%u] %.128s (trying to connect via %s), errcode, errstr, conn-scheme); /* no mnd_ since we don't allocate it */ efree(errstr); } Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd.c === --- php/php-src/trunk/ext/mysqlnd/mysqlnd.c 2011-07-27 09:41:33 UTC (rev 313766) +++ php/php-src/trunk/ext/mysqlnd/mysqlnd.c 2011-07-27 10:26:59 UTC (rev 313767) @@ -931,9 +931,9 @@ PACKET_FREE(greet_packet); if (errstr) { - DBG_ERR_FMT([%u] %.64s (trying to connect via %s), errcode, errstr, conn-scheme); + DBG_ERR_FMT([%u] %.128s (trying to connect via %s), errcode, errstr, conn-scheme); SET_CLIENT_ERROR(conn-error_info, errcode? errcode:CR_CONNECTION_ERROR, UNKNOWN_SQLSTATE, errstr); - php_error_docref(NULL TSRMLS_CC, E_WARNING, [%u] %.64s (trying to connect via %s), errcode, errstr, conn-scheme); + php_error_docref(NULL TSRMLS_CC, E_WARNING, [%u] %.128s (trying to connect via %s), errcode, errstr, conn-scheme); /* no mnd_ since we don't allocate it */ efree(errstr); } -- 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_4/TSRM/tsrm_virtual_cwd.c trunk/TSRM/tsrm_virtual_cwd.c
pajoye Wed, 27 Jul 2011 11:57:44 + Revision: http://svn.php.net/viewvc?view=revisionrevision=313771 Log: - do not resolve the link if all we want is to open that file Changed paths: U php/php-src/branches/PHP_5_4/TSRM/tsrm_virtual_cwd.c U php/php-src/trunk/TSRM/tsrm_virtual_cwd.c Modified: php/php-src/branches/PHP_5_4/TSRM/tsrm_virtual_cwd.c === --- php/php-src/branches/PHP_5_4/TSRM/tsrm_virtual_cwd.c2011-07-27 11:43:09 UTC (rev 313770) +++ php/php-src/branches/PHP_5_4/TSRM/tsrm_virtual_cwd.c2011-07-27 11:57:44 UTC (rev 313771) @@ -1453,7 +1453,7 @@ } CWD_STATE_COPY(new_state, CWDG(cwd)); - if (virtual_file_ex(new_state, path, NULL, CWD_FILEPATH TSRMLS_CC)) { + if (virtual_file_ex(new_state, path, NULL, CWD_EXPAND TSRMLS_CC)) { CWD_STATE_FREE(new_state); return NULL; } Modified: php/php-src/trunk/TSRM/tsrm_virtual_cwd.c === --- php/php-src/trunk/TSRM/tsrm_virtual_cwd.c 2011-07-27 11:43:09 UTC (rev 313770) +++ php/php-src/trunk/TSRM/tsrm_virtual_cwd.c 2011-07-27 11:57:44 UTC (rev 313771) @@ -1453,7 +1453,7 @@ } CWD_STATE_COPY(new_state, CWDG(cwd)); - if (virtual_file_ex(new_state, path, NULL, CWD_FILEPATH TSRMLS_CC)) { + if (virtual_file_ex(new_state, path, NULL, CWD_EXPAND TSRMLS_CC)) { CWD_STATE_FREE(new_state); return NULL; } -- 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_4/TSRM/tsrm_virtual_cwd.c trunk/TSRM/tsrm_virtual_cwd.c
pajoye Wed, 27 Jul 2011 11:58:39 + Revision: http://svn.php.net/viewvc?view=revisionrevision=313772 Log: - WS Changed paths: U php/php-src/branches/PHP_5_4/TSRM/tsrm_virtual_cwd.c U php/php-src/trunk/TSRM/tsrm_virtual_cwd.c Modified: php/php-src/branches/PHP_5_4/TSRM/tsrm_virtual_cwd.c === --- php/php-src/branches/PHP_5_4/TSRM/tsrm_virtual_cwd.c2011-07-27 11:57:44 UTC (rev 313771) +++ php/php-src/branches/PHP_5_4/TSRM/tsrm_virtual_cwd.c2011-07-27 11:58:39 UTC (rev 313772) @@ -706,7 +706,6 @@ } else { CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r-path_len + 1 + r-realpath_len + 1; } - free(r); } else if (key == (*bucket)-key path_len == (*bucket)-path_len memcmp(path, (*bucket)-path, path_len) == 0) { Modified: php/php-src/trunk/TSRM/tsrm_virtual_cwd.c === --- php/php-src/trunk/TSRM/tsrm_virtual_cwd.c 2011-07-27 11:57:44 UTC (rev 313771) +++ php/php-src/trunk/TSRM/tsrm_virtual_cwd.c 2011-07-27 11:58:39 UTC (rev 313772) @@ -705,8 +705,7 @@ CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r-path_len + 1; } else { CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r-path_len + 1 + r-realpath_len + 1; - } - + } free(r); } else if (key == (*bucket)-key path_len == (*bucket)-path_len memcmp(path, (*bucket)-path, path_len) == 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_4/main/fopen_wrappers.c trunk/main/fopen_wrappers.c
pajoye Wed, 27 Jul 2011 12:20:32 + Revision: http://svn.php.net/viewvc?view=revisionrevision=313774 Log: - do not resolve the link if all we want is to open that file Changed paths: U php/php-src/branches/PHP_5_4/main/fopen_wrappers.c U php/php-src/trunk/main/fopen_wrappers.c Modified: php/php-src/branches/PHP_5_4/main/fopen_wrappers.c === --- php/php-src/branches/PHP_5_4/main/fopen_wrappers.c 2011-07-27 12:18:12 UTC (rev 313773) +++ php/php-src/branches/PHP_5_4/main/fopen_wrappers.c 2011-07-27 12:20:32 UTC (rev 313774) @@ -348,7 +348,7 @@ } fp = VCWD_FOPEN(path, mode); if (fp opened_path) { - *opened_path = expand_filepath(path, NULL TSRMLS_CC); + *opened_path = expand_filepath_with_mode(path, NULL, NULL, 0, CWD_EXPAND TSRMLS_CC); } return fp; } Modified: php/php-src/trunk/main/fopen_wrappers.c === --- php/php-src/trunk/main/fopen_wrappers.c 2011-07-27 12:18:12 UTC (rev 313773) +++ php/php-src/trunk/main/fopen_wrappers.c 2011-07-27 12:20:32 UTC (rev 313774) @@ -348,7 +348,7 @@ } fp = VCWD_FOPEN(path, mode); if (fp opened_path) { - *opened_path = expand_filepath(path, NULL TSRMLS_CC); + *opened_path = expand_filepath_with_mode(path, NULL, NULL, 0, CWD_EXPAND TSRMLS_CC); } return fp; } -- 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_4/Zend/zend_strtod.c trunk/Zend/zend_strtod.c
dsp Wed, 27 Jul 2011 14:17:45 + Revision: http://svn.php.net/viewvc?view=revisionrevision=313781 Log: Check if given string is long enough in zend_*_strtod Changed paths: U php/php-src/branches/PHP_5_4/Zend/zend_strtod.c U php/php-src/trunk/Zend/zend_strtod.c Modified: php/php-src/branches/PHP_5_4/Zend/zend_strtod.c === --- php/php-src/branches/PHP_5_4/Zend/zend_strtod.c 2011-07-27 14:04:39 UTC (rev 313780) +++ php/php-src/branches/PHP_5_4/Zend/zend_strtod.c 2011-07-27 14:17:45 UTC (rev 313781) @@ -2585,6 +2585,11 @@ int any = 0; double value = 0; + if (strlen(str) 2) { + *endptr = str; + return 0.0; + } + if (*s == '0' (s[1] == 'x' || s[1] == 'X')) { s += 2; } @@ -2618,6 +2623,11 @@ double value = 0; int any = 0; + if (strlen(str) 1) { + *endptr = str; + return 0.0; + } + /* skip leading zero */ s++; @@ -2646,6 +2656,11 @@ double value = 0; int any = 0; + if (strlen(str) 2) { + *endptr = str; + return 0.0; + } + if ('0' == *s ('b' == s[1] || 'B' == s[1])) { s += 2; } Modified: php/php-src/trunk/Zend/zend_strtod.c === --- php/php-src/trunk/Zend/zend_strtod.c2011-07-27 14:04:39 UTC (rev 313780) +++ php/php-src/trunk/Zend/zend_strtod.c2011-07-27 14:17:45 UTC (rev 313781) @@ -2585,6 +2585,11 @@ int any = 0; double value = 0; + if (strlen(str) 2) { + *endptr = str; + return 0.0; + } + if (*s == '0' (s[1] == 'x' || s[1] == 'X')) { s += 2; } @@ -2618,6 +2623,11 @@ double value = 0; int any = 0; + if (strlen(str) 1) { + *endptr = str; + return 0.0; + } + /* skip leading zero */ s++; @@ -2646,6 +2656,11 @@ double value = 0; int any = 0; + if (strlen(str) 2) { + *endptr = str; + return 0.0; + } + if ('0' == *s ('b' == s[1] || 'B' == s[1])) { s += 2; } -- 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/TSRM/tsrm_win32.c branches/PHP_5_4/TSRM/tsrm_win32.c trunk/TSRM/tsrm_win32.c
pajoye Wed, 27 Jul 2011 14:23:06 + Revision: http://svn.php.net/viewvc?view=revisionrevision=313782 Log: - Fix #55295, check if malloc failed Bug: https://bugs.php.net/55295 (error getting bug information) Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/TSRM/tsrm_win32.c U php/php-src/branches/PHP_5_4/TSRM/tsrm_win32.c U php/php-src/trunk/TSRM/tsrm_win32.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-07-27 14:17:45 UTC (rev 313781) +++ php/php-src/branches/PHP_5_3/NEWS 2011-07-27 14:23:06 UTC (rev 313782) @@ -10,6 +10,10 @@ . On blocking SSL sockets respect the timeout option where possible. (Scott) +- Core + . Fix bug #55295 [NEW]: popen_ex on windows, fixed possible heap overflow +(Pierre) + 14 Jul 2011, PHP 5.3.7 RC3 - Zend Engine: . Fixed bug #55156 (ReflectionClass::getDocComment() returns comment even Modified: php/php-src/branches/PHP_5_3/TSRM/tsrm_win32.c === --- php/php-src/branches/PHP_5_3/TSRM/tsrm_win32.c 2011-07-27 14:17:45 UTC (rev 313781) +++ php/php-src/branches/PHP_5_3/TSRM/tsrm_win32.c 2011-07-27 14:23:06 UTC (rev 313782) @@ -532,6 +532,10 @@ } cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+sizeof( /c )+2); + if (!cmd) { + return NULL; + } + sprintf(cmd, %s /c \%s\, TWG(comspec), command); if (asuser) { res = CreateProcessAsUser(token_user, NULL, cmd, security, security, security.bInheritHandle, dwCreateFlags, env, cwd, startup, process); Modified: php/php-src/branches/PHP_5_4/TSRM/tsrm_win32.c === --- php/php-src/branches/PHP_5_4/TSRM/tsrm_win32.c 2011-07-27 14:17:45 UTC (rev 313781) +++ php/php-src/branches/PHP_5_4/TSRM/tsrm_win32.c 2011-07-27 14:23:06 UTC (rev 313782) @@ -530,6 +530,10 @@ } cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+sizeof( /c )+2); + if (!cmd) { + return NULL; + } + sprintf(cmd, %s /c \%s\, TWG(comspec), command); if (asuser) { res = CreateProcessAsUser(token_user, NULL, cmd, security, security, security.bInheritHandle, dwCreateFlags, env, cwd, startup, process); Modified: php/php-src/trunk/TSRM/tsrm_win32.c === --- php/php-src/trunk/TSRM/tsrm_win32.c 2011-07-27 14:17:45 UTC (rev 313781) +++ php/php-src/trunk/TSRM/tsrm_win32.c 2011-07-27 14:23:06 UTC (rev 313782) @@ -530,6 +530,10 @@ } cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+sizeof( /c )+2); + if (!cmd) { + return NULL; + } + sprintf(cmd, %s /c \%s\, TWG(comspec), command); if (asuser) { res = CreateProcessAsUser(token_user, NULL, cmd, security, security, security.bInheritHandle, dwCreateFlags, env, cwd, startup, process); -- 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_4/ext/fileinfo/fileinfo.c trunk/ext/fileinfo/fileinfo.c
pajoye Wed, 27 Jul 2011 14:58:30 + Revision: http://svn.php.net/viewvc?view=revisionrevision=313784 Log: - do safemode/open basedir checks 1st, and use only expand not realpath (it is done by the safemode/openbasedir check already) Changed paths: U php/php-src/branches/PHP_5_4/ext/fileinfo/fileinfo.c U php/php-src/trunk/ext/fileinfo/fileinfo.c Modified: php/php-src/branches/PHP_5_4/ext/fileinfo/fileinfo.c === --- php/php-src/branches/PHP_5_4/ext/fileinfo/fileinfo.c2011-07-27 14:37:46 UTC (rev 313783) +++ php/php-src/branches/PHP_5_4/ext/fileinfo/fileinfo.c2011-07-27 14:58:30 UTC (rev 313784) @@ -293,10 +293,6 @@ if (file_len == 0) { file = NULL; } else if (file *file) { /* user specified file, perform open_basedir checks */ - if (!VCWD_REALPATH(file, resolved_path)) { - RETURN_FALSE; - } - file = resolved_path; #if PHP_API_VERSION 20100412 if ((PG(safe_mode) (!php_checkuid(file, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(file TSRMLS_CC)) { @@ -305,6 +301,10 @@ #endif RETURN_FALSE; } + if (!expand_filepath_with_mode(file, resolved_path, NULL, 0, CWD_EXPAND TSRMLS_CC)) { + RETURN_FALSE; + } + file = resolved_path; } finfo = emalloc(sizeof(struct php_fileinfo)); Modified: php/php-src/trunk/ext/fileinfo/fileinfo.c === --- php/php-src/trunk/ext/fileinfo/fileinfo.c 2011-07-27 14:37:46 UTC (rev 313783) +++ php/php-src/trunk/ext/fileinfo/fileinfo.c 2011-07-27 14:58:30 UTC (rev 313784) @@ -293,10 +293,6 @@ if (file_len == 0) { file = NULL; } else if (file *file) { /* user specified file, perform open_basedir checks */ - if (!VCWD_REALPATH(file, resolved_path)) { - RETURN_FALSE; - } - file = resolved_path; #if PHP_API_VERSION 20100412 if ((PG(safe_mode) (!php_checkuid(file, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(file TSRMLS_CC)) { @@ -305,6 +301,10 @@ #endif RETURN_FALSE; } + if (!expand_filepath_with_mode(file, resolved_path, NULL, 0, CWD_EXPAND TSRMLS_CC)) { + RETURN_FALSE; + } + file = resolved_path; } finfo = emalloc(sizeof(struct php_fileinfo)); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /SVNROOT/ global_avail
rasmus Wed, 27 Jul 2011 23:06:09 + Revision: http://svn.php.net/viewvc?view=revisionrevision=313802 Log: Zend karma for Gopal Changed paths: U SVNROOT/global_avail Modified: SVNROOT/global_avail === --- SVNROOT/global_avail2011-07-27 23:04:39 UTC (rev 313801) +++ SVNROOT/global_avail2011-07-27 23:06:09 UTC (rev 313802) @@ -42,7 +42,7 @@ avail|loudi,cweiske,mrkschan,pmjones|phd,web/doc,web/doc-editor # People who work on the Engine - not people with just tests access -avail|andi,zeev,andrei,stas,sterling,sascha,derick,sebastian,phanto,jani,hirokawa,fujimoto,rvenkat,sesser,kalowsky,iliaa,hyanantha,georg,wez,edink,helly,hholzgra,imajes,gschlossnagle,moriyoshi,dmitry,jon,pollita,tony2001,johannes,bjori,davidw,nicholsr,wharmby,felipe,robinf,scottmac,nlopess,mattwil,colder,lbarnaud,pajoye,cseiler,dsp,shire,gron|php/php-src/*/Zend,php/php-src/*/TSRM +avail|andi,zeev,andrei,stas,sterling,sascha,derick,sebastian,phanto,jani,hirokawa,fujimoto,rvenkat,sesser,kalowsky,iliaa,hyanantha,georg,wez,edink,helly,hholzgra,imajes,gschlossnagle,moriyoshi,dmitry,jon,pollita,tony2001,johannes,bjori,davidw,nicholsr,wharmby,felipe,robinf,scottmac,nlopess,mattwil,colder,lbarnaud,pajoye,cseiler,dsp,shire,gron,gopalv|php/php-src/*/Zend,php/php-src/*/TSRM # The PHP Documentation Group maintains the documentation and its # translations. -- 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_4/Zend/ zend_string.c zend_string.h
gopalv Wed, 27 Jul 2011 23:34:49 + Revision: http://svn.php.net/viewvc?view=revisionrevision=313803 Log: Allow zend_is_interned_string to be pluggable Changed paths: U php/php-src/branches/PHP_5_4/Zend/zend_string.c U php/php-src/branches/PHP_5_4/Zend/zend_string.h Modified: php/php-src/branches/PHP_5_4/Zend/zend_string.c === --- php/php-src/branches/PHP_5_4/Zend/zend_string.c 2011-07-27 23:06:09 UTC (rev 313802) +++ php/php-src/branches/PHP_5_4/Zend/zend_string.c 2011-07-27 23:34:49 UTC (rev 313803) @@ -30,10 +30,12 @@ #endif ZEND_API const char *(*zend_new_interned_string)(const char *str, int len, int free_src TSRMLS_DC); +ZEND_API zend_bool (*zend_is_interned_string)(const char *str TSRMLS_DC); ZEND_API void (*zend_interned_strings_snapshot)(TSRMLS_D); ZEND_API void (*zend_interned_strings_restore)(TSRMLS_D); static const char *zend_new_interned_string_int(const char *str, int len, int free_src TSRMLS_DC); +static zend_bool zend_is_interned_string_int(const char *str TSRMLS_DC); static void zend_interned_strings_snapshot_int(TSRMLS_D); static void zend_interned_strings_restore_int(TSRMLS_D); @@ -64,6 +66,7 @@ #endif zend_new_interned_string = zend_new_interned_string_int; + zend_is_interned_string = zend_is_interned_string_int; zend_interned_strings_snapshot = zend_interned_strings_snapshot_int; zend_interned_strings_restore = zend_interned_strings_restore_int; } @@ -177,6 +180,11 @@ #endif } +static zend_bool zend_is_interned_string_int(const char *s TSRMLS_DC) +{ + return (((s) = CG(interned_strings_start)) ((s) CG(interned_strings_end))); +} + static void zend_interned_strings_snapshot_int(TSRMLS_D) { CG(interned_strings_snapshot_top) = CG(interned_strings_top); Modified: php/php-src/branches/PHP_5_4/Zend/zend_string.h === --- php/php-src/branches/PHP_5_4/Zend/zend_string.h 2011-07-27 23:06:09 UTC (rev 313802) +++ php/php-src/branches/PHP_5_4/Zend/zend_string.h 2011-07-27 23:34:49 UTC (rev 313803) @@ -24,6 +24,7 @@ #include zend.h ZEND_API extern const char *(*zend_new_interned_string)(const char *str, int len, int free_src TSRMLS_DC); +ZEND_API extern zend_bool (*zend_is_interned_string)(const char *str TSRMLS_DC); ZEND_API extern void (*zend_interned_strings_snapshot)(TSRMLS_D); ZEND_API extern void (*zend_interned_strings_restore)(TSRMLS_D); @@ -33,7 +34,7 @@ #ifndef ZTS #define IS_INTERNED(s) \ - (((s) = CG(interned_strings_start)) ((s) CG(interned_strings_end))) + (zend_is_interned_string ? zend_is_interned_string((s) TSRMLS_CC) : 0) #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/Zend/ zend_string.c zend_string.h
gopalv Thu, 28 Jul 2011 03:03:06 + Revision: http://svn.php.net/viewvc?view=revisionrevision=313805 Log: merge to trunk - Allow zend_is_interned_string to be pluggable Changed paths: U php/php-src/trunk/Zend/zend_string.c U php/php-src/trunk/Zend/zend_string.h Modified: php/php-src/trunk/Zend/zend_string.c === --- php/php-src/trunk/Zend/zend_string.c2011-07-27 23:35:21 UTC (rev 313804) +++ php/php-src/trunk/Zend/zend_string.c2011-07-28 03:03:06 UTC (rev 313805) @@ -30,10 +30,12 @@ #endif ZEND_API const char *(*zend_new_interned_string)(const char *str, int len, int free_src TSRMLS_DC); +ZEND_API zend_bool (*zend_is_interned_string)(const char *str TSRMLS_DC); ZEND_API void (*zend_interned_strings_snapshot)(TSRMLS_D); ZEND_API void (*zend_interned_strings_restore)(TSRMLS_D); static const char *zend_new_interned_string_int(const char *str, int len, int free_src TSRMLS_DC); +static zend_bool zend_is_interned_string_int(const char *str TSRMLS_DC); static void zend_interned_strings_snapshot_int(TSRMLS_D); static void zend_interned_strings_restore_int(TSRMLS_D); @@ -64,6 +66,7 @@ #endif zend_new_interned_string = zend_new_interned_string_int; + zend_is_interned_string = zend_is_interned_string_int; zend_interned_strings_snapshot = zend_interned_strings_snapshot_int; zend_interned_strings_restore = zend_interned_strings_restore_int; } @@ -177,6 +180,11 @@ #endif } +static zend_bool zend_is_interned_string_int(const char *s TSRMLS_DC) +{ + return (((s) = CG(interned_strings_start)) ((s) CG(interned_strings_end))); +} + static void zend_interned_strings_snapshot_int(TSRMLS_D) { CG(interned_strings_snapshot_top) = CG(interned_strings_top); Modified: php/php-src/trunk/Zend/zend_string.h === --- php/php-src/trunk/Zend/zend_string.h2011-07-27 23:35:21 UTC (rev 313804) +++ php/php-src/trunk/Zend/zend_string.h2011-07-28 03:03:06 UTC (rev 313805) @@ -24,6 +24,7 @@ #include zend.h ZEND_API extern const char *(*zend_new_interned_string)(const char *str, int len, int free_src TSRMLS_DC); +ZEND_API extern zend_bool (*zend_is_interned_string)(const char *str TSRMLS_DC); ZEND_API extern void (*zend_interned_strings_snapshot)(TSRMLS_D); ZEND_API extern void (*zend_interned_strings_restore)(TSRMLS_D); @@ -33,7 +34,7 @@ #ifndef ZTS #define IS_INTERNED(s) \ - (((s) = CG(interned_strings_start)) ((s) CG(interned_strings_end))) + (zend_is_interned_string ? zend_is_interned_string((s) TSRMLS_CC) : 0) #else -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php