Mike Hearn : kernel: Don't crash on NULL arg in GetShortPathNameW.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Apr 7 13:30:55 CDT 2006


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

Author: Mike Hearn <mike at plan99.net>
Date:   Thu Apr  6 21:46:33 2006 +0100

kernel: Don't crash on NULL arg in GetShortPathNameW.

---

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

diff --git a/dlls/kernel/path.c b/dlls/kernel/path.c
index d3fd764..dee6918 100644
--- a/dlls/kernel/path.c
+++ b/dlls/kernel/path.c
@@ -431,7 +431,6 @@ DWORD WINAPI GetShortPathNameW( LPCWSTR 
     LPCWSTR             p;
     DWORD               sp = 0, lp = 0;
     DWORD               tmplen;
-    BOOL                unixabsolute = (longpath[0] == '/');
     WIN32_FIND_DATAW    wfd;
     HANDLE              goit;
     UNICODE_STRING      ustr;
@@ -451,7 +450,7 @@ DWORD WINAPI GetShortPathNameW( LPCWSTR 
     }
 
     /* check for drive letter */
-    if (!unixabsolute && longpath[1] == ':' )
+    if (longpath[0] != '/' && longpath[1] == ':' )
     {
         tmpshortpath[0] = longpath[0];
         tmpshortpath[1] = ':';




More information about the wine-cvs mailing list