Skip to content

Commit 97c227c

Browse files
error27lenb
authored andcommitted
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>
1 parent 1826271 commit 97c227c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/acpi/sbshc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
#define PREFIX "ACPI: "
2020

21-
#define ACPI_SMB_HC_CLASS "smbus_host_controller"
21+
#define ACPI_SMB_HC_CLASS "smbus_host_ctl"
2222
#define ACPI_SMB_HC_DEVICE_NAME "ACPI SMBus HC"
2323

2424
struct acpi_smb_hc {

0 commit comments

Comments
 (0)