ACPICA: Fix to handle NULL package elements correctly

Fixed problem where NULL package elements were not returned to
the AcpiEvaluateObject interface correctly. Instead of returning a
NULL ACPI_OBJECT package element, the element was simply ignored,
potentially causing a buffer overflow and/or confusing the caller
who expected a fixed number of elements.

http://bugzilla.kernel.org/show_bug.cgi?id=10132

Signed-off-by: Lin Ming <[email protected]>
Signed-off-by: Bob Moore <[email protected]>
Signed-off-by: Alexey Starikovskiy <[email protected]>
Signed-off-by: Len Brown <[email protected]>
This commit is contained in:
Lin Ming 2008-04-10 19:06:43 +04:00 • committed by Len Brown
commit 7a5bb99645
2 changed files with 19 additions and 15 deletions

View file

@ -470,9 +470,8 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object,
case ACPI_TYPE_PROCESSOR:
case ACPI_TYPE_POWER:
/*
* No extra data for these types
*/
/* No extra data for these types */
break;
case ACPI_TYPE_LOCAL_REFERENCE: