ACK: [PATCH] acpi: gtdt: fix buffer overrun comparison
Alex Hung
alex.hung at canonical.com
Fri Apr 1 09:05:59 UTC 2016
On 03/30/2016 06:27 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> The check to see if we overrun the data buffer is incorrect, the
> comparison is currently the wrong way around. Thanks to Vikas C Sajjan
> for finding and reporting this bug.
>
> Reported-by: Vikas C Sajjan <vikas.cha.sajjan at hpe.com>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/acpi/gtdt/gtdt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/acpi/gtdt/gtdt.c b/src/acpi/gtdt/gtdt.c
> index 421f17f..1c98185 100644
> --- a/src/acpi/gtdt/gtdt.c
> +++ b/src/acpi/gtdt/gtdt.c
> @@ -75,7 +75,7 @@ static int gtdt_test1(fwts_framework *fw)
> case 0x00:
> /* GT Block Structure */
> block = (fwts_acpi_table_gtdt_block *)ptr;
> - if (ptr + 20 < end_ptr) {
> + if (ptr + 20 > end_ptr) {
> passed = false;
> fwts_failed(fw, LOG_LEVEL_HIGH,
> "GTDTShortBlock",
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list