Author: gschneider
Date: Tue Aug 11 16:19:43 2009
New Revision: 42617
URL:
http://svn.reactos.org/svn/reactos?rev=42617&view=rev
Log:
Return INVALID_FILE_ATTRIBUTES when no filename is passed
Modified:
trunk/reactos/dll/win32/kernel32/file/file.c
Modified: trunk/reactos/dll/win32/kernel32/file/file.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/fi…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/file.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/file/file.c [iso-8859-1] Tue Aug 11 16:19:43 2009
@@ -996,9 +996,9 @@
{
WIN32_FILE_ATTRIBUTE_DATA FileAttributeData;
PWSTR FileNameW;
- BOOL ret;
-
- if (!(FileNameW = FilenameA2W(lpFileName, FALSE)))
+ BOOL ret;
+
+ if (!lpFileName || !(FileNameW = FilenameA2W(lpFileName, FALSE)))
return INVALID_FILE_ATTRIBUTES;
ret = GetFileAttributesExW(FileNameW, GetFileExInfoStandard, &FileAttributeData);