Author: tkreuzer
Date: Wed Mar 9 15:31:25 2011
New Revision: 51004
URL:
http://svn.reactos.org/svn/reactos?rev=51004&view=rev
Log:
[win32csr]
Fix zero termination of harderror string parameters, when they are ansi.
See issue #5983 for more details.
Modified:
trunk/reactos/subsystems/win32/csrss/win32csr/harderror.c
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/harderror.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/harderror.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/harderror.c [iso-8859-1] Wed Mar 9
15:31:25 2011
@@ -118,7 +118,7 @@
ULONG nParam, UnicodeStringParameterMask, Size = 0;
NTSTATUS Status;
UNICODE_STRING TempStringU;
- PWSTR ParamString;
+ CHAR *ParamString;
UnicodeStringParameterMask = HardErrorMessage->UnicodeStringParameterMask;
@@ -166,7 +166,8 @@
}
/* Zero terminate the string */
- ParamString[TempStringU.Length / sizeof(WCHAR)] = 0;
+ ParamString[TempStringU.Length] = 0;
+ ParamString[TempStringU.Length + 1] = 0;
DPRINT("ParamString=\'%S\'\n", ParamString);
Parameters[nParam] = (ULONG_PTR)ParamString;