Don't assume UNICODE_STRINGs are nul terminated

svn path=/trunk/; revision=17762
This commit is contained in:
Gé van Geldorp 2005-09-09 12:22:01 +00:00
parent c0337d5d24
commit 7555a90fe9

View file

@ -2343,7 +2343,8 @@ CSR_API(CsrGetTitle)
RtlZeroMemory(&Request->Data.GetTitleRequest, sizeof(CSRSS_GET_TITLE)); RtlZeroMemory(&Request->Data.GetTitleRequest, sizeof(CSRSS_GET_TITLE));
Request->Data.GetTitleRequest.ConsoleHandle = Request->Data.GetTitleRequest.ConsoleHandle; Request->Data.GetTitleRequest.ConsoleHandle = Request->Data.GetTitleRequest.ConsoleHandle;
Request->Data.GetTitleRequest.Length = Console->Title.Length; Request->Data.GetTitleRequest.Length = Console->Title.Length;
wcscpy (Request->Data.GetTitleRequest.Title, Console->Title.Buffer); memcpy (Request->Data.GetTitleRequest.Title, Console->Title.Buffer,
Console->Title.Length);
Length = CSR_API_MESSAGE_HEADER_SIZE(CSRSS_SET_TITLE) + Console->Title.Length; Length = CSR_API_MESSAGE_HEADER_SIZE(CSRSS_SET_TITLE) + Console->Title.Length;
ConioUnlockConsole(Console); ConioUnlockConsole(Console);