kernel32: Fix a crash with GetLongPathNameW and UNC path names.
This commit is contained in:
parent
b4b7724a79
commit
d58bd680b1
|
@ -313,9 +313,15 @@ DWORD WINAPI GetLongPathNameW( LPCWSTR shortpath, LPWSTR longpath, DWORD longlen
|
|||
|
||||
if (shortpath[0] == '\\' && shortpath[1] == '\\')
|
||||
{
|
||||
ERR("UNC pathname %s\n", debugstr_w(shortpath));
|
||||
lstrcpynW( longpath, shortpath, longlen );
|
||||
return strlenW(longpath);
|
||||
FIXME("UNC pathname %s\n", debugstr_w(shortpath));
|
||||
|
||||
tmplen = strlenW(shortpath);
|
||||
if (tmplen < longlen)
|
||||
{
|
||||
if (longpath != shortpath) strcpyW( longpath, shortpath );
|
||||
return tmplen;
|
||||
}
|
||||
return tmplen + 1;
|
||||
}
|
||||
|
||||
unixabsolute = (shortpath[0] == '/');
|
||||
|
|
Loading…
Reference in New Issue