https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7f687154a0fe47826d804…
commit 7f687154a0fe47826d8047f1a4f9cfd93414d45f
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Wed Jan 31 10:26:24 2018 +0100
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Wed Jan 31 10:38:06 2018 +0100
[WIN32K:NTGDI] Correctly interpret RtlCreateUnicodeString return value. CORE-14271
---
win32ss/gdi/ntgdi/freetype.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c
index 5fb58cf3e4..7f24ba90dd 100644
--- a/win32ss/gdi/ntgdi/freetype.c
+++ b/win32ss/gdi/ntgdi/freetype.c
@@ -323,6 +323,7 @@ IntLoadFontSubstList(PLIST_ENTRY pHead)
BYTE CharSets[FONTSUBST_FROM_AND_TO];
LPWSTR pch;
PFONTSUBST_ENTRY pEntry;
+ BOOLEAN Success;
/* the FontSubstitutes registry key */
static UNICODE_STRING FontSubstKey =
@@ -367,10 +368,11 @@ IntLoadFontSubstList(PLIST_ENTRY pHead)
pInfo = (PKEY_VALUE_FULL_INFORMATION)InfoBuffer;
Length = pInfo->NameLength / sizeof(WCHAR);
pInfo->Name[Length] = UNICODE_NULL; /* truncate */
- Status = RtlCreateUnicodeString(&FromW, pInfo->Name);
- if (!NT_SUCCESS(Status))
+ Success = RtlCreateUnicodeString(&FromW, pInfo->Name);
+ if (!Success)
{
- DPRINT("RtlCreateUnicodeString failed: 0x%08X\n", Status);
+ Status = STATUS_INSUFFICIENT_RESOURCES;
+ DPRINT("RtlCreateUnicodeString failed\n");
break; /* failure */
}