- IntCreateWindow: Fill out MaximumLength field of the window name. Fixes potential buffer overflow in at least NtUserDefSetText.

svn path=/trunk/; revision=50135
This commit is contained in:
Roel Messiant 2010-12-25 05:27:01 +00:00
parent 9e8a4109b0
commit cbd14f3708

View file

@ -1759,6 +1759,7 @@ PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
RtlCopyMemory(pWnd->strName.Buffer, WindowName->Buffer, WindowName->Length);
pWnd->strName.Buffer[WindowName->Length / sizeof(WCHAR)] = L'\0';
pWnd->strName.Length = WindowName->Length;
pWnd->strName.MaximumLength = WindowName->Length + sizeof(UNICODE_NULL);
}
/* Correct the window style. */