Commit ddd0e03e authored by Mike Hearn's avatar Mike Hearn Committed by Alexandre Julliard

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

parent 1740fe0f
......@@ -431,7 +431,6 @@ DWORD WINAPI GetShortPathNameW( LPCWSTR longpath, LPWSTR shortpath, DWORD shortl
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 longpath, LPWSTR shortpath, DWORD shortl
}
/* check for drive letter */
if (!unixabsolute && longpath[1] == ':' )
if (longpath[0] != '/' && longpath[1] == ':' )
{
tmpshortpath[0] = longpath[0];
tmpshortpath[1] = ':';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment