Added check for table length so invalid values are screened out
@@ -142,12 +142,19 @@ int get_acpi_table(
rc = ACPI_ERR_BADTABLE;
}
else
+ {
+ if (p_table->header.length > total_table_size)
+ {
+ rc = ACPI_ERR_BADTABLE;
+ }
+ else
{
rc = check_acpi_table(signature, p_table);
}
}
}
}
+ }
close(fd);
}
