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

Signed-off-by: Michael Müller <michael@fds-team.de>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Müller 2016-03-31 06:04:43 +02:00 committed by Alexandre Julliard
parent bd17022c90
commit 33a368c422
1 changed files with 1 additions and 0 deletions

View File

@ -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 );
}