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

Alexandre Julliard julliard at wine.codeweavers.com
Mon Oct 2 15:00:36 CDT 2006


Module: wine
Branch: master
Commit: 44da24759c8f8c27f94a9cf8ec7bb1b23bd52204
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=44da24759c8f8c27f94a9cf8ec7bb1b23bd52204

Author: Louis. Lenders <xerox_xerox2000 at yahoo.co.uk>
Date:   Fri Sep 29 08:17:07 2006 +0100

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

---

 dlls/kernel32/path.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c
index ddd169c..b53ebdb 100644
--- a/dlls/kernel32/path.c
+++ b/dlls/kernel32/path.c
@@ -294,7 +294,7 @@ 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;
 
@@ -318,6 +318,8 @@ DWORD WINAPI GetLongPathNameW( LPCWSTR s
         return strlenW(longpath);
     }
 
+    unixabsolute = (shortpath[0] == '/');
+
     /* check for drive letter */
     if (!unixabsolute && shortpath[1] == ':' )
     {




More information about the wine-cvs mailing list