projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a40770a
)
power_meter: acpi_device_class "power_meter_resource" too long
author
Dan Carpenter
<
[email protected]
>
Tue, 27 Apr 2010 21:01:07 +0000
(14:01 -0700)
committer
Len Brown
<
[email protected]
>
Thu, 6 May 2010 06:38:24 +0000
(
02:38
-0400)
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 <
[email protected]
>
Cc: Len Brown <
[email protected]
>
Cc: "Darrick J. Wong" <
[email protected]
>
Cc: <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Len Brown <
[email protected]
>
drivers/acpi/power_meter.c
patch
|
blob
|
history
diff --git
a/drivers/acpi/power_meter.c
b/drivers/acpi/power_meter.c
index e8c32a49f14e552b4c19ad54065593f5008a2587..66f67293341ec5f82a01319b2a33c16c379eb84f 100644
(file)
--- a/
drivers/acpi/power_meter.c
+++ b/
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 "p
owe
r_meter_resource"
+#define ACPI_POWER_METER_CLASS "p
w
r_meter_resource"
#define NUM_SENSORS 17