sbshc: acpi_device_class "smbus_host_controller" too long
PATCH 3/4 sbshc: acpi_device_class "smbus_host_controller" too long
From: Dan Carpenter <[email protected]>
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 <[email protected]>
Cc Alexey Starikovskiy <[email protected]>
Cc Len Brown <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/acpi/sbshc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/sbshc.c renamed from drivers/acpi/sbshc.c~sbshc-acpi_device_class-smbus_host_controller-too-long +1 -1
@@ -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 {
_
applied
thanks,
Len Brown, Intel Open Source Technology Center