Author: tfaber
Date: Fri Apr 14 09:55:17 2017
New Revision: 74302
URL:
http://svn.reactos.org/svn/reactos?rev=74302&view=rev
Log:
[HIDCLASS]
Patch by Lesan Ilie:
- Avoid over-allocating the DEVICE_RELATIONS structure in HidClassPDO_CreatePDO
- Allocate device relations from paged pool
CORE-13052 #resolve
Modified:
trunk/reactos/drivers/hid/hidclass/pdo.c
Modified: trunk/reactos/drivers/hid/hidclass/pdo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/hid/hidclass/pdo.c…
==============================================================================
--- trunk/reactos/drivers/hid/hidclass/pdo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/hid/hidclass/pdo.c [iso-8859-1] Fri Apr 14 09:55:17 2017
@@ -652,8 +652,8 @@
//
// 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)
{
//