cvs: php-src(PHP_4_3) /win32 registry.c
| From: | Zeev Suraski | Date: | Mon, 14 Mar 2005 12:41:19 +0000 |
| Subject: | cvs: php-src(PHP_4_3) /win32 registry.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-30928@lists.php.net to get a copy of this message | ||
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);