Index: drivers/hid/hidclass/pdo.c =================================================================== --- drivers/hid/hidclass/pdo.c (revision 74283) +++ drivers/hid/hidclass/pdo.c (working copy) @@ -648,12 +648,13 @@ // FDODeviceExtension = DeviceObject->DeviceExtension; ASSERT(FDODeviceExtension->Common.IsFDO); + ASSERT(FDODeviceExtension->Common.DeviceDescription.CollectionDescLength); // // first allocate device relations // - Length = sizeof(DEVICE_RELATIONS) + sizeof(PDEVICE_OBJECT) * FDODeviceExtension->Common.DeviceDescription.CollectionDescLength; - DeviceRelations = ExAllocatePoolWithTag(NonPagedPool, Length, HIDCLASS_TAG); + Length = FIELD_OFFSET(DEVICE_RELATIONS, Objects) + sizeof(PDEVICE_OBJECT) * FDODeviceExtension->Common.DeviceDescription.CollectionDescLength; + DeviceRelations = ExAllocatePoolWithTag(PagedPool, Length, HIDCLASS_TAG); if (!DeviceRelations) { //