[PATCH] acpi: gtdt: fix buffer overrun comparison
Colin King
colin.king at canonical.com
Wed Mar 30 10:27:21 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 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",
--
2.7.4
More information about the fwts-devel
mailing list