diff options
author | Dan Carpenter <error27@gmail.com> | 2010-04-27 23:06:05 +0200 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-05-06 08:38:25 +0200 |
commit | 97c227cb51ddcf52c66f7a7fba69237026418b56 (patch) | |
tree | 68833613ebe79fb7cec38d3ff0be3a457844fe5b /drivers/acpi/sbshc.c | |
parent | power_meter: acpi_device_class "power_meter_resource" too long (diff) | |
download | linux-97c227cb51ddcf52c66f7a7fba69237026418b56.tar.xz linux-97c227cb51ddcf52c66f7a7fba69237026418b56.zip |
sbshc: acpi_device_class "smbus_host_controller" too long
acpi_device_class can only be 19 characters and a NULL terminator.
With the current name we get a buffer overflow in acpi_smbus_hc_add()
when we do:
strcpy(acpi_device_class(device), ACPI_SMB_HC_CLASS);
Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/sbshc.c')
-rw-r--r-- | drivers/acpi/sbshc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c index 36704b887ccf..f8be23b6c129 100644 --- a/drivers/acpi/sbshc.c +++ b/drivers/acpi/sbshc.c @@ -18,7 +18,7 @@ #define PREFIX "ACPI: " -#define ACPI_SMB_HC_CLASS "smbus_host_controller" +#define ACPI_SMB_HC_CLASS "smbus_host_ctl" #define ACPI_SMB_HC_DEVICE_NAME "ACPI SMBus HC" struct acpi_smb_hc { |