]> granicus.if.org Git - php/commitdiff
Fixed endless loop in open_basedir check
authorDmitry Stogov <dmitry@php.net>
Wed, 18 Apr 2007 11:59:03 +0000 (11:59 +0000)
committerDmitry Stogov <dmitry@php.net>
Wed, 18 Apr 2007 11:59:03 +0000 (11:59 +0000)
main/fopen_wrappers.c

index 843246e7eb53f46ba47e54b9830adc950edb62e4..476b4c8442acb815217fda9a0a2cfa9e763e0672 100644 (file)
@@ -208,6 +208,8 @@ PHPAPI int php_check_specific_open_basedir(const char *basedir, const char *path
                        if (path_len > 1 && path_tmp[path_len - 2] == ':') {
                                /* this is c:\,  */
                                path_tmp[path_len] = '\0';
+                       } else {
+                               path_tmp[path_len - 1] = '\0';
                        }
 #else
                        path_tmp[path_len - 1] = '\0';