Commit 1bb69a0c authored by Alexandre Julliard's avatar Alexandre Julliard

Make GetFullPathName fail if input path name is empty.

parent 0ca9bba6
......@@ -1236,14 +1236,15 @@ static DWORD DOSFS_DoGetFullPathName( LPCSTR name, DWORD len, LPSTR result,
char driveletter=0;
int namelen,drive=0;
if ((strlen(name) >1)&& (name[1]==':'))
/* drive letter given */
if (!name[0]) return 0;
if (name[1]==':')
/*drive letter given */
{
driveletter = name[0];
}
if ((strlen(name) >2)&& (name[1]==':') &&
((name[2]=='\\') || (name[2]=='/')))
/* absolute path given */
if ((name[1]==':') && ((name[2]=='\\') || (name[2]=='/')))
/*absolute path given */
{
lstrcpynA(full_name.short_name,name,MAX_PATHNAME_LEN);
drive = (int)FILE_toupper(name[0]) - 'A';
......
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