Return INVALID_FILE_ATTRIBUTES when no filename is passed

svn path=/trunk/; revision=42617
This commit is contained in:
Gregor Schneider 2009-08-11 14:19:43 +00:00
parent dd9eabe375
commit d6e84af5f7

View file

@ -996,9 +996,9 @@ GetFileAttributesA(LPCSTR lpFileName)
{
WIN32_FILE_ATTRIBUTE_DATA FileAttributeData;
PWSTR FileNameW;
BOOL ret;
BOOL ret;
if (!(FileNameW = FilenameA2W(lpFileName, FALSE)))
if (!lpFileName || !(FileNameW = FilenameA2W(lpFileName, FALSE)))
return INVALID_FILE_ATTRIBUTES;
ret = GetFileAttributesExW(FileNameW, GetFileExInfoStandard, &FileAttributeData);