From 44da24759c8f8c27f94a9cf8ec7bb1b23bd52204 Mon Sep 17 00:00:00 2001 From: "Louis. Lenders" Date: Fri, 29 Sep 2006 08:17:07 +0100 Subject: [PATCH] kernel32: Print an error instead of crashing in GetLongPathNameW if shortpath=0. --- dlls/kernel32/path.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c index ddd169ca6f7..b53ebdb9267 100644 --- a/dlls/kernel32/path.c +++ b/dlls/kernel32/path.c @@ -294,7 +294,7 @@ DWORD WINAPI GetLongPathNameW( LPCWSTR shortpath, LPWSTR longpath, DWORD longlen LPCWSTR p; DWORD sp = 0, lp = 0; DWORD tmplen; - BOOL unixabsolute = (shortpath[0] == '/'); + BOOL unixabsolute; WIN32_FIND_DATAW wfd; HANDLE goit; @@ -318,6 +318,8 @@ DWORD WINAPI GetLongPathNameW( LPCWSTR shortpath, LPWSTR longpath, DWORD longlen return strlenW(longpath); } + unixabsolute = (shortpath[0] == '/'); + /* check for drive letter */ if (!unixabsolute && shortpath[1] == ':' ) {