iliaa           Tue Sep 27 11:08:11 2005 EDT

  Modified files:              (Branch: PHP_5_0)
    /php-src/main       fopen_wrappers.c 
  Log:
  MFH: Fixed bug #32937 (open_basedir looses trailing / in the limiter).
  
  
http://cvs.php.net/diff.php/php-src/main/fopen_wrappers.c?r1=1.170.2.4&r2=1.170.2.5&ty=u
Index: php-src/main/fopen_wrappers.c
diff -u php-src/main/fopen_wrappers.c:1.170.2.4 
php-src/main/fopen_wrappers.c:1.170.2.5
--- php-src/main/fopen_wrappers.c:1.170.2.4     Sat Jul 16 08:14:44 2005
+++ php-src/main/fopen_wrappers.c       Tue Sep 27 11:08:11 2005
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: fopen_wrappers.c,v 1.170.2.4 2005/07/16 12:14:44 hyanantha Exp $ */
+/* $Id: fopen_wrappers.c,v 1.170.2.5 2005/09/27 15:08:11 iliaa Exp $ */
 
 /* {{{ includes
  */
@@ -109,8 +109,8 @@
                /* Handler for basedirs that end with a / */
                resolved_basedir_len = strlen(resolved_basedir);
                if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) {
-                       if (resolved_basedir[resolved_basedir_len - 1] == '/') {
-                               resolved_basedir[resolved_basedir_len - 1] = 
PHP_DIR_SEPARATOR;
+                       if (resolved_basedir[resolved_basedir_len - 1] != 
PHP_DIR_SEPARATOR) {
+                               resolved_basedir[resolved_basedir_len] = 
PHP_DIR_SEPARATOR;
                                resolved_basedir[++resolved_basedir_len] = '\0';
                        }
                }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to