Commit d58bd680 authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

kernel32: Fix a crash with GetLongPathNameW and UNC path names.

parent b4b7724a
...@@ -313,9 +313,15 @@ DWORD WINAPI GetLongPathNameW( LPCWSTR shortpath, LPWSTR longpath, DWORD longlen ...@@ -313,9 +313,15 @@ DWORD WINAPI GetLongPathNameW( LPCWSTR shortpath, LPWSTR longpath, DWORD longlen
if (shortpath[0] == '\\' && shortpath[1] == '\\') if (shortpath[0] == '\\' && shortpath[1] == '\\')
{ {
ERR("UNC pathname %s\n", debugstr_w(shortpath)); FIXME("UNC pathname %s\n", debugstr_w(shortpath));
lstrcpynW( longpath, shortpath, longlen );
return strlenW(longpath); tmplen = strlenW(shortpath);
if (tmplen < longlen)
{
if (longpath != shortpath) strcpyW( longpath, shortpath );
return tmplen;
}
return tmplen + 1;
} }
unixabsolute = (shortpath[0] == '/'); unixabsolute = (shortpath[0] == '/');
......
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