zeev            Mon Mar 14 07:41:19 2005 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src/win32      registry.c 
  Log:
  Fix an age old bug in parsing paths when reading
  INI values from the registry
  
  
http://cvs.php.net/diff.php/php-src/win32/registry.c?r1=1.12.2.1&r2=1.12.2.2&ty=u
Index: php-src/win32/registry.c
diff -u php-src/win32/registry.c:1.12.2.1 php-src/win32/registry.c:1.12.2.2
--- php-src/win32/registry.c:1.12.2.1   Tue Mar 16 13:27:55 2004
+++ php-src/win32/registry.c    Mon Mar 14 07:41:18 2005
@@ -38,6 +38,9 @@
                                drive_letter = tmp_buf[0];
                                cwd++;
                        }
+                       while (*cwd == '\\' || *cwd == '/') {
+                               cwd++;
+                       }
                        path = (char *) 
emalloc(2+strlen(cwd)+1+strlen(orig_path)+1);
                        sprintf(path, "%c\\%s\\%s", drive_letter, cwd, 
orig_path);
                        efree(orig_path);

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

Reply via email to