ACK: [PATCH] acpi: acpidump: abort dumping of SLIC if length is zero

Alex Hung alex.hung at canonical.com
Tue Mar 19 02:13:23 UTC 2013


On 03/18/2013 11:32 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Some systems have a length specified as zero in the SLIC header
> length field which means we get stuck dumping the null headers
> forever.  Add a check so we can break out early.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>   src/acpi/acpidump/acpidump.c | 11 +++++++++++
>   1 file changed, 11 insertions(+)
>
> diff --git a/src/acpi/acpidump/acpidump.c b/src/acpi/acpidump/acpidump.c
> index 5f3e25e..ecb6592 100644
> --- a/src/acpi/acpidump/acpidump.c
> +++ b/src/acpi/acpidump/acpidump.c
> @@ -1452,6 +1452,17 @@ static void acpidump_slic(fwts_framework *fw, fwts_acpi_table_info *table)
>   		fwts_acpi_table_slic_header *header =
>   			(fwts_acpi_table_slic_header *)ptr;
>
> +		/*
> +		 *  Some machines such as the Acer Veritas have a SLIC header that
> +		 *  declares it's length as zero.  So to avoid spinning forever
> +		 *  break out of the loop.
> +		 */
> +		if ((ptr + sizeof(fwts_acpi_table_slic_header) < data + length) &&
> +		    (header->length == 0)) {
> +			fwts_log_info(fw, "SLIC header length is zero, aborting dump of SLIC.");
> +			break;
> +		}
> +
>   		switch(header->type) {
>   		case 0:
>   			__acpi_dump_table_fields(fw, ptr, slic_header_fields, ptr - data);
>
Acked-by: Alex Hung <alex.hung at canonical.com>



More information about the fwts-devel mailing list