Skip to content

Commit

Permalink
sbshc: acpi_device_class "smbus_host_controller" too long
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Len Brown committed May 6, 2010
1 parent 1826271 commit 97c227c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/sbshc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 97c227c

Please sign in to comment.