[PATCH] ACPI: index off by one?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Should maybe this be applied? please review.
--------------------------->8-------------8<------------------------------
When index equals ACPI_NAME_SIZE, that is still one too large.

Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
---
diff --git a/drivers/acpi/acpica/nsnames.c b/drivers/acpi/acpica/nsnames.c
index ae3dc10..232c80c 100644
--- a/drivers/acpi/acpica/nsnames.c
+++ b/drivers/acpi/acpica/nsnames.c
@@ -87,7 +87,7 @@ acpi_ns_build_external_path(struct acpi_namespace_node *node,
 	parent_node = node;
 	name_buffer[index] = 0;
 
-	while ((index > ACPI_NAME_SIZE) && (parent_node != acpi_gbl_root_node)) {
+	while ((index >= ACPI_NAME_SIZE) && (parent_node != acpi_gbl_root_node)) {
 		index -= ACPI_NAME_SIZE;
 
 		/* Put the name into the buffer */
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux