diff options
Diffstat (limited to 'source/components/resources/rslist.c')
-rw-r--r-- | source/components/resources/rslist.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/components/resources/rslist.c b/source/components/resources/rslist.c index a9fd875..80d6f78 100644 --- a/source/components/resources/rslist.c +++ b/source/components/resources/rslist.c @@ -199,6 +199,15 @@ AcpiRsConvertResourcesToAml ( return_ACPI_STATUS (AE_BAD_DATA); } + /* Sanity check the length. It must not be zero, or we loop forever */ + + if (!Resource->Length) + { + ACPI_ERROR ((AE_INFO, + "Invalid zero length descriptor in resource list\n")); + return_ACPI_STATUS (AE_AML_BAD_RESOURCE_LENGTH); + } + /* Perform the conversion */ if (Resource->Type == ACPI_RESOURCE_TYPE_SERIAL_BUS) |