Skip to content
This repository was archived by the owner on Oct 13, 2018. It is now read-only.

Commit 7f68715

Browse files
committed
[WIN32K:NTGDI] Correctly interpret RtlCreateUnicodeString return value. CORE-14271
1 parent 6e750d1 commit 7f68715

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

win32ss/gdi/ntgdi/freetype.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ IntLoadFontSubstList(PLIST_ENTRY pHead)
323323
BYTE CharSets[FONTSUBST_FROM_AND_TO];
324324
LPWSTR pch;
325325
PFONTSUBST_ENTRY pEntry;
326+
BOOLEAN Success;
326327

327328
/* the FontSubstitutes registry key */
328329
static UNICODE_STRING FontSubstKey =
@@ -367,10 +368,11 @@ IntLoadFontSubstList(PLIST_ENTRY pHead)
367368
pInfo = (PKEY_VALUE_FULL_INFORMATION)InfoBuffer;
368369
Length = pInfo->NameLength / sizeof(WCHAR);
369370
pInfo->Name[Length] = UNICODE_NULL; /* truncate */
370-
Status = RtlCreateUnicodeString(&FromW, pInfo->Name);
371-
if (!NT_SUCCESS(Status))
371+
Success = RtlCreateUnicodeString(&FromW, pInfo->Name);
372+
if (!Success)
372373
{
373-
DPRINT("RtlCreateUnicodeString failed: 0x%08X\n", Status);
374+
Status = STATUS_INSUFFICIENT_RESOURCES;
375+
DPRINT("RtlCreateUnicodeString failed\n");
374376
break; /* failure */
375377
}
376378

0 commit comments

Comments
 (0)