[PATCH] acpi: gtdt: fix buffer overrun comparison (for SBSA)
Colin King
colin.king at canonical.com
Wed Mar 30 15:57:49 UTC 2016
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 Sunil V L
for finding and reporting this bug.
Reported-by: Sunil V L <sunil.vl 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 1c98185..b5ee280 100644
--- a/src/acpi/gtdt/gtdt.c
+++ b/src/acpi/gtdt/gtdt.c
@@ -181,7 +181,7 @@ static int gtdt_test1(fwts_framework *fw)
case 0x01:
/* SBSA Generic Watchdog Timer Structure */
watchdog = (fwts_acpi_table_gtdt_watchdog *)ptr;
- if (ptr + 28 < end_ptr) {
+ if (ptr + 28 > end_ptr) {
passed = false;
fwts_failed(fw, LOG_LEVEL_HIGH,
"GTDTShortWatchDogTimer",
--
2.7.4
More information about the fwts-devel
mailing list