mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +00: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:
parent
0ad7647067
commit
bbb19308ea
1 changed files with 4 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue