diff options
author | Robert Moore <Robert.Moore@intel.com> | 2009-05-07 13:12:59 -0700 |
---|---|---|
committer | Robert Moore <Robert.Moore@intel.com> | 2009-05-07 13:12:59 -0700 |
commit | eab3288b4b1a0159440afc7b96e341c64bb5dd92 (patch) | |
tree | 94ac2e00d40cbd8d2b4138d16e19c94be2ee5e95 /source/components/resources | |
parent | b64d850f1f58d5b5e592e8ca4832a8ce3b990c89 (diff) |
Additional validation of _PRT packages (resource mgr).
Fixes a possible fault when parsing an ill-formed _PRT package.
Diffstat (limited to 'source/components/resources')
-rw-r--r-- | source/components/resources/rscalc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/components/resources/rscalc.c b/source/components/resources/rscalc.c index b5c39da31..76aa44ff8 100644 --- a/source/components/resources/rscalc.c +++ b/source/components/resources/rscalc.c @@ -656,6 +656,14 @@ AcpiRsGetPciRoutingTableLength ( PackageElement = *TopObjectList; + /* We must have a valid Package object */ + + if (!PackageElement || + (PackageElement->Common.Type != ACPI_TYPE_PACKAGE)) + { + return_ACPI_STATUS (AE_AML_OPERAND_TYPE); + } + /* * The SubObjectList will now point to an array of the * four IRQ elements: Address, Pin, Source and SourceIndex |