mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[NTOS:IO] Check RtlAnsiStringToUnicodeString return value when initializing Arc names
CORE-17637
This commit is contained in:
parent
293f823053
commit
24a4e12a76
1 changed files with 6 additions and 2 deletions
|
@ -54,12 +54,16 @@ IopCreateArcNames(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
|||
/* Create the global HAL partition name */
|
||||
sprintf(Buffer, "\\ArcName\\%s", LoaderBlock->ArcHalDeviceName);
|
||||
RtlInitAnsiString(&ArcString, Buffer);
|
||||
RtlAnsiStringToUnicodeString(&IoArcHalDeviceName, &ArcString, TRUE);
|
||||
Status = RtlAnsiStringToUnicodeString(&IoArcHalDeviceName, &ArcString, TRUE);
|
||||
if (!NT_SUCCESS(Status))
|
||||
return Status;
|
||||
|
||||
/* Create the global system partition name */
|
||||
sprintf(Buffer, "\\ArcName\\%s", LoaderBlock->ArcBootDeviceName);
|
||||
RtlInitAnsiString(&ArcString, Buffer);
|
||||
RtlAnsiStringToUnicodeString(&IoArcBootDeviceName, &ArcString, TRUE);
|
||||
Status = RtlAnsiStringToUnicodeString(&IoArcBootDeviceName, &ArcString, TRUE);
|
||||
if (!NT_SUCCESS(Status))
|
||||
return Status;
|
||||
|
||||
/* Allocate memory for the string */
|
||||
Length = strlen(LoaderBlock->ArcBootDeviceName) + sizeof(ANSI_NULL);
|
||||
|
|
Loading…
Reference in a new issue