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>
This commit is contained in:
Dan Carpenter 2010-04-27 14:06:05 -07:00 committed by Len Brown
parent 18262714ca
commit 97c227cb51
1 changed files with 1 additions and 1 deletions

View File

@ -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 {