mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[NTOS:IO] Check RtlAnsiStringToUnicodeString return value when initializing ramdisk
CORE-17637
This commit is contained in:
parent
e961958823
commit
293f823053
2 changed files with 13 additions and 1 deletions
|
@ -80,6 +80,10 @@
|
|||
// Unable to create symbolic link pointing to the RAM disk device
|
||||
//
|
||||
#define RD_SYMLINK_CREATE_FAILED 5
|
||||
//
|
||||
// Unable to create system root path when creating the RAM disk
|
||||
//
|
||||
#define RD_SYSROOT_INIT_FAILED 6
|
||||
|
||||
//
|
||||
// Max traversal of reparse points for a single open in IoParseDevice
|
||||
|
|
|
@ -262,7 +262,15 @@ IopStartRamdisk(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
|||
RtlInitEmptyUnicodeString(&NtSystemRoot,
|
||||
SharedUserData->NtSystemRoot,
|
||||
sizeof(SharedUserData->NtSystemRoot));
|
||||
RtlAnsiStringToUnicodeString(&NtSystemRoot, &AnsiPath, FALSE);
|
||||
Status = RtlAnsiStringToUnicodeString(&NtSystemRoot, &AnsiPath, FALSE);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
KeBugCheckEx(RAMDISK_BOOT_INITIALIZATION_FAILED,
|
||||
RD_SYSROOT_INIT_FAILED,
|
||||
Status,
|
||||
0,
|
||||
0);
|
||||
}
|
||||
IoCreateSymbolicLink(&DriveLetter, &DeviceString);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue