Commit 18262714 authored by Dan Carpenter's avatar Dan Carpenter Committed by Len Brown

power_meter: acpi_device_class "power_meter_resource" too long

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: default avatarDan Carpenter <>
Cc: Len Brown <>
Cc: "Darrick J. Wong" <>
Cc: <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLen Brown <>
parent a40770a9
......@@ -35,7 +35,7 @@
#define ACPI_POWER_METER_NAME "power_meter"
#define ACPI_POWER_METER_CLASS "power_meter_resource"
#define ACPI_POWER_METER_CLASS "pwr_meter_resource"
#define NUM_SENSORS 17
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment