Commit 5933c2a6 authored by Alexandre Julliard's avatar Alexandre Julliard

kernelbase: Don't allow the full Unicode character range in path functions.

parent 0eec0eb7
......@@ -507,7 +507,7 @@ HANDLE WINAPI DECLSPEC_HOTPATCH CreateFileW( LPCWSTR filename, DWORD access, DWO
if (!wcsncmp( filename, L"\\\\.\\", 4 ))
{
if ((iswalpha(filename[4]) && filename[5] == ':' && filename[6] == '\0') ||
if ((filename[4] && filename[5] == ':' && !filename[6]) ||
!wcsnicmp( filename + 4, L"PIPE\\", 5 ) ||
!wcsnicmp( filename + 4, L"MAILSLOT\\", 9 ))
{
......
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