mirror of
https://github.com/reactos/reactos.git
synced 2026-07-06 17:44:24 +08:00
[NTOSKRNL]
Move the PDO check in IoOpenDeviceRegistryKey() to the function begin. Requested by sir_richard. svn path=/trunk/; revision=47829
This commit is contained in:
@@ -3507,6 +3507,10 @@ IoOpenDeviceRegistryKey(IN PDEVICE_OBJECT DeviceObject,
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if (!IopIsValidPhysicalDeviceObject(DeviceObject))
|
||||
return STATUS_INVALID_DEVICE_REQUEST;
|
||||
DeviceNode = IopGetDeviceNode(DeviceObject);
|
||||
|
||||
/*
|
||||
* Calculate the length of the base key name. This is the full
|
||||
* name for driver key or the name excluding "Device Parameters"
|
||||
@@ -3527,9 +3531,6 @@ IoOpenDeviceRegistryKey(IN PDEVICE_OBJECT DeviceObject,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!IopIsValidPhysicalDeviceObject(DeviceObject))
|
||||
return STATUS_INVALID_DEVICE_REQUEST;
|
||||
DeviceNode = IopGetDeviceNode(DeviceObject);
|
||||
KeyNameLength += sizeof(EnumKeyName) - sizeof(UNICODE_NULL) +
|
||||
DeviceNode->InstancePath.Length;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user