[kernel32]

-OpenConsoleW: Don't crash when wsName is null

svn path=/trunk/; revision=47235
This commit is contained in:
Giannis Adamopoulos 2010-05-16 07:03:03 +00:00
parent 5ea607ab59
commit 9271a5bcb0

View file

@ -993,11 +993,11 @@ OpenConsoleW(LPCWSTR wsName,
ULONG CsrRequest;
NTSTATUS Status = STATUS_SUCCESS;
if (0 == _wcsicmp(wsName, L"CONIN$"))
if (wsName && 0 == _wcsicmp(wsName, L"CONIN$"))
{
CsrRequest = MAKE_CSR_API(GET_INPUT_HANDLE, CSR_NATIVE);
}
else if (0 == _wcsicmp(wsName, L"CONOUT$"))
else if (wsName && 0 == _wcsicmp(wsName, L"CONOUT$"))
{
CsrRequest = MAKE_CSR_API(GET_OUTPUT_HANDLE, CSR_NATIVE);
}