Author: cgutman
Date: Fri Aug 19 22:00:48 2011
New Revision: 53328
URL:
http://svn.reactos.org/svn/reactos?rev=53328&view=rev
Log:
[HAL]
- Fix the length calculation for the resource requirements list
Modified:
trunk/reactos/hal/halx86/generic/acpi/halacpi.c
Modified: trunk/reactos/hal/halx86/generic/acpi/halacpi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/acpi/ha…
==============================================================================
--- trunk/reactos/hal/halx86/generic/acpi/halacpi.c [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/generic/acpi/halacpi.c [iso-8859-1] Fri Aug 19 22:00:48 2011
@@ -983,8 +983,8 @@
HalpAcpiDetectResourceListSize(&Count);
/* Compute size of the list and allocate it */
- ListSize = sizeof(IO_RESOURCE_LIST) * (Count - 1) +
- sizeof(IO_RESOURCE_REQUIREMENTS_LIST);
+ ListSize = FIELD_OFFSET(IO_RESOURCE_REQUIREMENTS_LIST, List[0].Descriptors) +
+ ((Count - 1) * sizeof(IO_RESOURCE_DESCRIPTOR));
RequirementsList = ExAllocatePoolWithTag(PagedPool, ListSize, ' laH');
if (RequirementsList)
{