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