aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-04-27 17:01:07 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-12 18:03:09 -0400
commit912e28b8c8390235097fd471b91f5c8c2c0f083e (patch)
tree4f2e0a939686a9367f379d3519681b35b27692fa /drivers
parenta84461fa4a30a846ac0e590e3ceea88ec10fed89 (diff)
power_meter: acpi_device_class "power_meter_resource" too long
commit 18262714ca0fb65c290b8ea1807b2b02bb52d0e3 upstream. 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> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/power_meter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/power_meter.c b/drivers/acpi/power_meter.c
index dc4ffadf8122..e02d93c10c6a 100644
--- a/drivers/acpi/power_meter.c
+++ b/drivers/acpi/power_meter.c
@@ -34,7 +34,7 @@
34#define ACPI_POWER_METER_NAME "power_meter" 34#define ACPI_POWER_METER_NAME "power_meter"
35ACPI_MODULE_NAME(ACPI_POWER_METER_NAME); 35ACPI_MODULE_NAME(ACPI_POWER_METER_NAME);
36#define ACPI_POWER_METER_DEVICE_NAME "Power Meter" 36#define ACPI_POWER_METER_DEVICE_NAME "Power Meter"
37#define ACPI_POWER_METER_CLASS "power_meter_resource" 37#define ACPI_POWER_METER_CLASS "pwr_meter_resource"
38 38
39#define NUM_SENSORS 17 39#define NUM_SENSORS 17
40 40