kernel32: Print an error instead of crashing in GetLongPathNameW if shortpath=0

Louis. Lenders xerox_xerox2000 at yahoo.co.uk
Fri Sep 29 02:17:07 CDT 2006


Skipped content of type multipart/alternative-------------- next part --------------
diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c
index ddd169c..d3c101c 100644
--- a/dlls/kernel32/path.c
+++ b/dlls/kernel32/path.c
@@ -294,15 +294,19 @@ DWORD WINAPI GetLongPathNameW( LPCWSTR s
     LPCWSTR             p;
     DWORD               sp = 0, lp = 0;
     DWORD               tmplen;
-    BOOL                unixabsolute = (shortpath[0] == '/');
+    BOOL                unixabsolute; 
     WIN32_FIND_DATAW    wfd;
     HANDLE              goit;
 
     if (!shortpath)
     {
         SetLastError(ERROR_INVALID_PARAMETER);
+        ERR("shortpath is 0\n");
         return 0;
     }
+
+    unixabsolute = (shortpath[0] == '/');
+
     if (!shortpath[0])
     {
         SetLastError(ERROR_PATH_NOT_FOUND);


More information about the wine-patches mailing list