Skip to content

Commit b2e89d7

Browse files
committed
Disassembler: fix regression for ResourceTemplates
detection and proper disassembly of resource templates was broken.
1 parent c991d08 commit b2e89d7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

source/components/utilities/utresrc.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,6 @@ AcpiUtWalkAmlResources (
533533
UINT8 *EndAml;
534534
UINT8 ResourceIndex;
535535
UINT32 Length;
536-
ACPI_SIZE ThisAmlLength = 0;
537536
UINT32 Offset = 0;
538537
UINT8 EndTag[2] = {0x79, 0x00};
539538

@@ -608,7 +607,7 @@ AcpiUtWalkAmlResources (
608607

609608
/* Check if buffer is defined to be longer than the resource length */
610609

611-
if (AmlLength > ThisAmlLength)
610+
if (AmlLength > (Offset + Length))
612611
{
613612
return_ACPI_STATUS (AE_AML_NO_RESOURCE_END_TAG);
614613
}
@@ -618,7 +617,6 @@ AcpiUtWalkAmlResources (
618617
return_ACPI_STATUS (AE_OK);
619618
}
620619

621-
ThisAmlLength += Length;
622620
Aml += Length;
623621
Offset += Length;
624622
}

0 commit comments

Comments
 (0)