Author: dchapyshev
Date: Mon Apr 13 16:26:28 2009
New Revision: 40479
URL:
http://svn.reactos.org/svn/reactos?rev=40479&view=rev
Log:
- Add check on CodePage = 0. +2 passed wine tests
Modified:
trunk/reactos/subsystems/win32/csrss/win32csr/conio.c
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/conio.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/conio.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/conio.c [iso-8859-1] Mon Apr 13 16:26:28
2009
@@ -2970,12 +2970,20 @@
Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - sizeof(PORT_MESSAGE);
- if (IsValidCodePage(Request->Data.SetConsoleCodePage.CodePage))
+ if (Request->Data.SetConsoleCodePage.CodePage == 0)
+ {
+ ConioUnlockConsole(Console);
+ return STATUS_INVALID_PARAMETER;
+ }
+ else
+ {
+ if (IsValidCodePage(Request->Data.SetConsoleCodePage.CodePage))
{
Console->CodePage = Request->Data.SetConsoleCodePage.CodePage;
ConioUnlockConsole(Console);
return STATUS_SUCCESS;
}
+ }
ConioUnlockConsole(Console);
return STATUS_UNSUCCESSFUL;
}