Use sizeof(WCHAR) instead of sizeof(PWCHAR) when calculating REG_SZ size for NtSetValueKey

svn path=/trunk/; revision=53431
This commit is contained in:
Timo Kreuzer 2011-08-25 07:03:12 +00:00
parent 4a306627d7
commit ef74f83550

View file

@ -38,7 +38,7 @@ PopupError(IN PCCH Text,
IN PINPUT_RECORD Ir, IN PINPUT_RECORD Ir,
IN ULONG WaitEvent); IN ULONG WaitEvent);
static static
ULONG ULONG
FindLanguageIndex() FindLanguageIndex()
{ {
@ -143,8 +143,8 @@ MUIDisplayPage(IN ULONG page)
do do
{ {
CONSOLE_SetStyledText ( CONSOLE_SetStyledText (
entry[index].X, entry[index].X,
entry[index].Y, entry[index].Y,
entry[index].Flags, entry[index].Flags,
entry[index].Buffer); entry[index].Buffer);
@ -517,7 +517,7 @@ AddCodepageToRegistry(IN LPCWSTR ACPage, IN LPCWSTR OEMCPage, IN LPCWSTR MACCPag
0, 0,
REG_SZ, REG_SZ,
(PVOID)ACPage, (PVOID)ACPage,
(wcslen(ACPage)+1) * sizeof(PWCHAR)); (wcslen(ACPage)+1) * sizeof(WCHAR));
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status); DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
@ -532,7 +532,7 @@ AddCodepageToRegistry(IN LPCWSTR ACPage, IN LPCWSTR OEMCPage, IN LPCWSTR MACCPag
0, 0,
REG_SZ, REG_SZ,
(PVOID)OEMCPage, (PVOID)OEMCPage,
(wcslen(OEMCPage)+1) * sizeof(PWCHAR)); (wcslen(OEMCPage)+1) * sizeof(WCHAR));
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status); DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
@ -547,7 +547,7 @@ AddCodepageToRegistry(IN LPCWSTR ACPage, IN LPCWSTR OEMCPage, IN LPCWSTR MACCPag
0, 0,
REG_SZ, REG_SZ,
(PVOID)MACCPage, (PVOID)MACCPage,
(wcslen(MACCPage)+1) * sizeof(PWCHAR)); (wcslen(MACCPage)+1) * sizeof(WCHAR));
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status); DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);