felipe Fri, 04 Jun 2010 00:10:15 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=300176
Log: - Fixed bug #51991 (spl_autoload and *nix support with namespace) Bug: http://bugs.php.net/51991 (Open) spl_autoload and *nix support with namespace Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/spl/php_spl.c U php/php-src/trunk/ext/spl/php_spl.c Modified: php/php-src/branches/PHP_5_3/NEWS =================================================================== --- php/php-src/branches/PHP_5_3/NEWS 2010-06-03 23:53:50 UTC (rev 300175) +++ php/php-src/branches/PHP_5_3/NEWS 2010-06-04 00:10:15 UTC (rev 300176) @@ -67,6 +67,7 @@ requests (Fixes CVE-2010-0397, bug #51288). (Raphael Geissert) - Fixed 64-bit integer overflow in mhash_keygen_s2k(). (Clément LECIGNE, Stas) +- Fixed bug #51991 (spl_autoload and *nix support with namespace). (Felipe) - Fixed bug #51911 (ReflectionParameter::getDefaultValue() memory leaks with constant array). (Felipe) - Fixed bug #51905 (ReflectionParameter fails if default value is an array Modified: php/php-src/branches/PHP_5_3/ext/spl/php_spl.c =================================================================== --- php/php-src/branches/PHP_5_3/ext/spl/php_spl.c 2010-06-03 23:53:50 UTC (rev 300175) +++ php/php-src/branches/PHP_5_3/ext/spl/php_spl.c 2010-06-04 00:10:15 UTC (rev 300176) @@ -231,6 +231,17 @@ class_file_len = spprintf(&class_file, 0, "%s%s", lc_name, file_extension); +#if DEFAULT_SLASH != '\\' + { + char *ptr = class_file; + char *end = ptr + class_file_len; + + while ((ptr = memchr(ptr, '\\', (end - ptr))) != NULL) { + *ptr = DEFAULT_SLASH; + } + } +#endif + ret = php_stream_open_for_zend_ex(class_file, &file_handle, ENFORCE_SAFE_MODE|USE_PATH|STREAM_OPEN_FOR_INCLUDE TSRMLS_CC); if (ret == SUCCESS) { Modified: php/php-src/trunk/ext/spl/php_spl.c =================================================================== --- php/php-src/trunk/ext/spl/php_spl.c 2010-06-03 23:53:50 UTC (rev 300175) +++ php/php-src/trunk/ext/spl/php_spl.c 2010-06-04 00:10:15 UTC (rev 300176) @@ -231,6 +231,17 @@ class_file_len = spprintf(&class_file, 0, "%s%s", lc_name, file_extension); +#if DEFAULT_SLASH != '\\' + { + char *ptr = class_file; + char *end = ptr + class_file_len; + + while ((ptr = memchr(ptr, '\\', (end - ptr))) != NULL) { + *ptr = DEFAULT_SLASH; + } + } +#endif + ret = php_stream_open_for_zend_ex(class_file, &file_handle, USE_PATH|STREAM_OPEN_FOR_INCLUDE TSRMLS_CC); if (ret == SUCCESS) {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php