Commit 33a368c4 authored by Michael Müller's avatar Michael Müller Committed by Alexandre Julliard

kernel32: Check for invalid filename pointers in CreateFileA for Win9x compatibility.

parent bd17022c
......@@ -1631,6 +1631,7 @@ HANDLE WINAPI CreateFileA( LPCSTR filename, DWORD access, DWORD sharing,
{
WCHAR *nameW;
if ((GetVersion() & 0x80000000) && IsBadStringPtrA(filename, -1)) return INVALID_HANDLE_VALUE;
if (!(nameW = FILE_name_AtoW( filename, FALSE ))) return INVALID_HANDLE_VALUE;
return CreateFileW( nameW, access, sharing, sa, creation, attributes, template );
}
......
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