From: akpm@linux-foundation.org
To: lenb@kernel.org
Cc: linux-acpi@vger.kernel.org, akpm@linux-foundation.org,
error27@gmail.com, djwong@us.ibm.com, stable@kernel.org
Subject: [patch for 2.6.34? 1/1] power_meter: acpi_device_class "power_meter_resource" too long
Date: Tue, 27 Apr 2010 14:01:07 -0700 [thread overview]
Message-ID: <201004272101.o3RL17kH019428@imap1.linux-foundation.org> (raw)
From: Dan Carpenter <error27@gmail.com>
acpi_device_class can only be 19 characters and a NULL terminator.
The current code has a buffer overflow in acpi_power_meter_add():
strcpy(acpi_device_class(device), ACPI_POWER_METER_CLASS);
Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: Len Brown <lenb@kernel.org>
Cc: "Darrick J. Wong" <djwong@us.ibm.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/acpi/power_meter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN drivers/acpi/power_meter.c~power_meter-acpi_device_class-power_meter_resource-too-long drivers/acpi/power_meter.c
--- a/drivers/acpi/power_meter.c~power_meter-acpi_device_class-power_meter_resource-too-long
+++ a/drivers/acpi/power_meter.c
@@ -35,7 +35,7 @@
#define ACPI_POWER_METER_NAME "power_meter"
ACPI_MODULE_NAME(ACPI_POWER_METER_NAME);
#define ACPI_POWER_METER_DEVICE_NAME "Power Meter"
-#define ACPI_POWER_METER_CLASS "power_meter_resource"
+#define ACPI_POWER_METER_CLASS "pwr_meter_resource"
#define NUM_SENSORS 17
_
next reply other threads:[~2010-04-27 21:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-27 21:01 akpm [this message]
2010-04-28 17:25 ` [patch for 2.6.34? 1/1] power_meter: acpi_device_class "power_meter_resource" too long Darrick J. Wong
2010-04-29 1:06 ` Len Brown
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=201004272101.o3RL17kH019428@imap1.linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=djwong@us.ibm.com \
--cc=error27@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=stable@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