From b362a62a7ecb59367f22e86cb216e238202b873b Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 22 Jun 2010 15:53:52 +0000 Subject: [PATCH] [NTOSKRNL] - Check that the caller passed a valid PDO pointer to IoOpenDeviceRegistryKey svn path=/trunk/; revision=47827 --- reactos/ntoskrnl/io/pnpmgr/pnpmgr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c index 9d130eca9df..06f1405045d 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -3528,6 +3528,8 @@ IoOpenDeviceRegistryKey(IN PDEVICE_OBJECT DeviceObject, else { DeviceNode = IopGetDeviceNode(DeviceObject); + if (!DeviceNode) + return STATUS_INVALID_DEVICE_REQUEST; KeyNameLength += sizeof(EnumKeyName) - sizeof(UNICODE_NULL) + DeviceNode->InstancePath.Length; }