mirror of
https://github.com/reactos/reactos.git
synced 2025-07-27 07:41:51 +00:00
[WIN32K:NTGDI] Fix more uses of RtlCreateUnicodeString. CORE-14271
Addendum to 7f687154a0
. Spotted by Hermès.
This commit is contained in:
parent
912434849f
commit
862b82f3fa
1 changed files with 12 additions and 4 deletions
|
@ -391,10 +391,11 @@ IntLoadFontSubstList(PLIST_ENTRY pHead)
|
||||||
pch = (LPWSTR)((PUCHAR)pInfo + pInfo->DataOffset);
|
pch = (LPWSTR)((PUCHAR)pInfo + pInfo->DataOffset);
|
||||||
Length = pInfo->DataLength / sizeof(WCHAR);
|
Length = pInfo->DataLength / sizeof(WCHAR);
|
||||||
pch[Length] = UNICODE_NULL; /* truncate */
|
pch[Length] = UNICODE_NULL; /* truncate */
|
||||||
Status = RtlCreateUnicodeString(&ToW, pch);
|
Success = RtlCreateUnicodeString(&ToW, pch);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!Success)
|
||||||
{
|
{
|
||||||
DPRINT("RtlCreateUnicodeString failed: 0x%08X\n", Status);
|
Status = STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
DPRINT("RtlCreateUnicodeString failed\n");
|
||||||
RtlFreeUnicodeString(&FromW);
|
RtlFreeUnicodeString(&FromW);
|
||||||
break; /* failure */
|
break; /* failure */
|
||||||
}
|
}
|
||||||
|
@ -2193,7 +2194,14 @@ IntGetFontLocalizedName(PUNICODE_STRING pNameW, PSHARED_FACE SharedFace,
|
||||||
/* Convert UTF-16 big endian to little endian */
|
/* Convert UTF-16 big endian to little endian */
|
||||||
SwapEndian(Buf, Name.string_len);
|
SwapEndian(Buf, Name.string_len);
|
||||||
|
|
||||||
Status = RtlCreateUnicodeString(pNameW, Buf);
|
if (RtlCreateUnicodeString(pNameW, Buf))
|
||||||
|
{
|
||||||
|
Status = STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Status = STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue