[NTOS:CM] Correctly interpret RtlCreateUnicodeString return value. CORE-14271

This commit is contained in:
Thomas Faber 2018-01-28 13:42:13 +01:00
parent 4e697fee2c
commit 6e750d189a
No known key found for this signature in database
GPG Key ID: 076E7C3D44720826

View File

@ -872,6 +872,8 @@ CmpInitializeSystemHive(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
UNICODE_STRING KeyName; UNICODE_STRING KeyName;
PCMHIVE SystemHive = NULL; PCMHIVE SystemHive = NULL;
PSECURITY_DESCRIPTOR SecurityDescriptor; PSECURITY_DESCRIPTOR SecurityDescriptor;
BOOLEAN Success;
PAGED_CODE(); PAGED_CODE();
/* Setup the ansi string */ /* Setup the ansi string */
@ -918,8 +920,9 @@ CmpInitializeSystemHive(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
} }
/* Set the hive filename */ /* Set the hive filename */
Status = RtlCreateUnicodeString(&SystemHive->FileFullPath, L"\\SystemRoot\\System32\\Config\\SYSTEM"); Success = RtlCreateUnicodeString(&SystemHive->FileFullPath,
if (!NT_SUCCESS(Status)) L"\\SystemRoot\\System32\\Config\\SYSTEM");
if (!Success)
{ {
return FALSE; return FALSE;
} }