From bd5edd68a8fda8df18c688919e100f7f1df5ad6b Mon Sep 17 00:00:00 2001 From: jkim Date: Fri, 15 Feb 2013 19:12:35 +0000 Subject: Import ACPICA 20130215. --- source/components/resources/rslist.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/components/resources/rslist.c') 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) -- cgit v1.1