- RtlCreateUnicodeString fails if the Length is > 0xFFFE on Windows NT 5.2 and higher. Spotted by Thomas.

svn path=/trunk/; revision=18944
This commit is contained in:
Alex Ionescu 2005-11-01 23:54:39 +00:00
parent baee1b54eb
commit 524dd664c3

View file

@ -1943,6 +1943,8 @@ RtlCreateUnicodeString(
PAGED_CODE_RTL();
Length = (wcslen(Source) + 1) * sizeof(WCHAR);
if (Length > 0xFFFE) return FALSE;
UniDest->Buffer = RtlpAllocateStringMemory(Length, TAG_USTR);
if (UniDest->Buffer == NULL) return FALSE;