- Fix allocation of CM_RESOURCE_LIST

- Might fix bug 4354
See issue #4354 for more details.

svn path=/trunk/; revision=40694
This commit is contained in:
Johannes Anderwald 2009-04-25 12:05:08 +00:00
parent 018ceb886d
commit 53767e20b1

View file

@ -340,9 +340,11 @@ IntVideoPortPnPStartDevice(
/* Save the resource list */
ResourceCount = AllocatedResources->List[0].PartialResourceList.Count;
ResourceListSize =
FIELD_OFFSET(CM_RESOURCE_LIST, List[0].PartialResourceList.
PartialDescriptors[ResourceCount]);
ResourceListSize = sizeof(CM_RESOURCE_LIST);
if (ResourceCount > 1)
ResourceListSize += (ResourceCount-1) * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR);
DeviceExtension->AllocatedResources = ExAllocatePool(PagedPool, ResourceListSize);
if (DeviceExtension->AllocatedResources == NULL)
{