From 6e750d189a8f8344f8a02e430074fd6a46aa6424 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Sun, 28 Jan 2018 13:42:13 +0100 Subject: [PATCH] [NTOS:CM] Correctly interpret RtlCreateUnicodeString return value. CORE-14271 --- ntoskrnl/config/cmsysini.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ntoskrnl/config/cmsysini.c b/ntoskrnl/config/cmsysini.c index b95610552a3..80bc55bbc10 100644 --- a/ntoskrnl/config/cmsysini.c +++ b/ntoskrnl/config/cmsysini.c @@ -872,6 +872,8 @@ CmpInitializeSystemHive(IN PLOADER_PARAMETER_BLOCK LoaderBlock) UNICODE_STRING KeyName; PCMHIVE SystemHive = NULL; PSECURITY_DESCRIPTOR SecurityDescriptor; + BOOLEAN Success; + PAGED_CODE(); /* Setup the ansi string */ @@ -918,8 +920,9 @@ CmpInitializeSystemHive(IN PLOADER_PARAMETER_BLOCK LoaderBlock) } /* Set the hive filename */ - Status = RtlCreateUnicodeString(&SystemHive->FileFullPath, L"\\SystemRoot\\System32\\Config\\SYSTEM"); - if (!NT_SUCCESS(Status)) + Success = RtlCreateUnicodeString(&SystemHive->FileFullPath, + L"\\SystemRoot\\System32\\Config\\SYSTEM"); + if (!Success) { return FALSE; } -- 2.17.1