From 1bb69a0c095af2ed0706e6527fb20106e5b69184 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 2 Apr 2002 02:46:27 +0000 Subject: [PATCH] Make GetFullPathName fail if input path name is empty. --- files/dos_fs.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/files/dos_fs.c b/files/dos_fs.c index ebd9c9b88c5..0ab59152931 100644 --- a/files/dos_fs.c +++ b/files/dos_fs.c @@ -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';