ACK: [PATCH 3/4] lib: fwts_acpi_tables: add checking for empty table parsing
ivanhu
ivan.hu at canonical.com
Tue Sep 8 09:32:15 UTC 2015
On 2015年09月08日 15:00, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/lib/src/fwts_acpi_tables.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c
> index 1592791..3fa200b 100644
> --- a/src/lib/src/fwts_acpi_tables.c
> +++ b/src/lib/src/fwts_acpi_tables.c
> @@ -655,6 +655,11 @@ static uint8_t *fwts_acpi_load_table_from_acpidump(
> if (n != 16)
> break;
> }
> + /* Unlikely, but an empty table should be checked for */
> + if (!tmp) {
> + fwts_log_error(fw, "ACPI table parser found an empty table '%s'.", name);
> + return NULL;
> + }
>
> /* Allocate the table using low 32 bit memory */
> if ((table = fwts_low_malloc(len)) == NULL) {
>
Acked-by: Ivan Hu <ivan.hu at canonical.com>
More information about the fwts-devel
mailing list