mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 05:26:58 +00:00
[NTOSKRNL] Fix a nullptr dereference in IopStartDevice
This commit is contained in:
parent
10c5bfb8fe
commit
b2b1c054e4
|
@ -786,7 +786,7 @@ IopStartDevice(
|
|||
{
|
||||
NTSTATUS Status;
|
||||
HANDLE InstanceHandle = NULL, ControlHandle = NULL;
|
||||
UNICODE_STRING KeyName;
|
||||
UNICODE_STRING KeyName, ValueString;
|
||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||
|
||||
if (DeviceNode->Flags & DNF_DISABLED)
|
||||
|
@ -817,7 +817,10 @@ IopStartDevice(
|
|||
goto ByeBye;
|
||||
|
||||
RtlInitUnicodeString(&KeyName, L"ActiveService");
|
||||
Status = ZwSetValueKey(ControlHandle, &KeyName, 0, REG_SZ, DeviceNode->ServiceName.Buffer, DeviceNode->ServiceName.Length + sizeof(UNICODE_NULL));
|
||||
ValueString = DeviceNode->ServiceName;
|
||||
if (!ValueString.Buffer)
|
||||
RtlInitUnicodeString(&ValueString, L"");
|
||||
Status = ZwSetValueKey(ControlHandle, &KeyName, 0, REG_SZ, ValueString.Buffer, ValueString.Length + sizeof(UNICODE_NULL));
|
||||
// }
|
||||
|
||||
ByeBye:
|
||||
|
|
Loading…
Reference in a new issue