Isn't that actually the same?
It also ignores the number of full descriptors, which I guess is wrong.
And it looks like the whole parsing code is broken. It ignores the
number of partial descriptors and does FullList++
Timo
janderwald(a)svn.reactos.org schrieb:
Author: janderwald
Date: Sat Apr 25 16:05:08 2009
New Revision: 40694
URL:
http://svn.reactos.org/svn/reactos?rev=40694&view=rev
Log:
- Fix allocation of CM_RESOURCE_LIST
- Might fix bug 4354
See issue #4354 for more details.
Modified:
trunk/reactos/drivers/video/videoprt/dispatch.c
Modified: trunk/reactos/drivers/video/videoprt/dispatch.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/dis…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/dispatch.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/video/videoprt/dispatch.c [iso-8859-1] Sat Apr 25 16:05:08
2009
@@ -340,9 +340,11 @@
/* 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)
{