Jeremy White : kernel32: Advance over the input buffer when stripping ./.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Dec 24 14:40:05 CST 2015
Module: wine
Branch: master
Commit: 440030b93848d1c41f532cac21320f75a8c67231
URL: http://source.winehq.org/git/wine.git/?a=commit;h=440030b93848d1c41f532cac21320f75a8c67231
Author: Jeremy White <jwhite at codeweavers.com>
Date: Mon Dec 21 15:20:08 2015 -0600
kernel32: Advance over the input buffer when stripping ./.
This is the same fix for GetLongPathName that was contained in a fix for
GetShortPathName in commit 9178d037d71e823f5d5eaa5008a3cdd574377bac.
Signed-off-by: Jeremy White <jwhite at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/kernel32/path.c | 1 +
dlls/kernel32/tests/path.c | 2 --
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c
index ff94227..ec14b35 100644
--- a/dlls/kernel32/path.c
+++ b/dlls/kernel32/path.c
@@ -349,6 +349,7 @@ DWORD WINAPI GetLongPathNameW( LPCWSTR shortpath, LPWSTR longpath, DWORD longlen
{
tmplongpath[lp++] = *p++;
tmplongpath[lp++] = *p++;
+ sp += 2;
}
for (; *p && *p != '/' && *p != '\\'; p++);
tmplen = p - (shortpath + sp);
diff --git a/dlls/kernel32/tests/path.c b/dlls/kernel32/tests/path.c
index e90a260..4504603 100644
--- a/dlls/kernel32/tests/path.c
+++ b/dlls/kernel32/tests/path.c
@@ -2138,9 +2138,7 @@ static void test_relative_path(void)
strcpy(buf, "deadbeef");
ret = pGetLongPathNameA(".\\..\\foo\\file", buf, MAX_PATH);
- todo_wine
ok(ret, "GetLongPathName error %d\n", GetLastError());
- todo_wine
ok(!strcmp(buf, ".\\..\\foo\\file"), "expected .\\..\\foo\\file, got %s\n", buf);
strcpy(buf, "deadbeef");
ret = GetShortPathNameA(".\\..\\foo\\file", buf, MAX_PATH);
More information about the wine-cvs
mailing list