From: Roel Kluin <roel.kluin@gmail.com>
To: lenb@kernel.org
Cc: linux-acpi@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] ACPI: index off by one?
Date: Sun, 22 Feb 2009 02:54:29 +0100 [thread overview]
Message-ID: <49A0B055.5060600@gmail.com> (raw)
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@gmail.com>
---
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 */
next reply other threads:[~2009-02-22 1:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-22 1:54 Roel Kluin [this message]
2009-02-23 15:36 ` [PATCH] ACPI: index off by one? Moore, Robert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49A0B055.5060600@gmail.com \
--to=roel.kluin@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox