public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 3/4] sbshc: acpi_device_class "smbus_host_controller" too long
@ 2010-04-27 21:06 akpm
  2010-04-29  1:16 ` Len Brown
  0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2010-04-27 21:06 UTC (permalink / raw)
  To: lenb; +Cc: linux-acpi, akpm, error27, astarikovskiy

From: Dan Carpenter <error27@gmail.com>

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>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/acpi/sbshc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/acpi/sbshc.c~sbshc-acpi_device_class-smbus_host_controller-too-long drivers/acpi/sbshc.c
--- a/drivers/acpi/sbshc.c~sbshc-acpi_device_class-smbus_host_controller-too-long
+++ a/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 {
_

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch 3/4] sbshc: acpi_device_class "smbus_host_controller" too long
  2010-04-27 21:06 [patch 3/4] sbshc: acpi_device_class "smbus_host_controller" too long akpm
@ 2010-04-29  1:16 ` Len Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Len Brown @ 2010-04-29  1:16 UTC (permalink / raw)
  To: akpm; +Cc: linux-acpi, error27, astarikovskiy

applied

thanks,
Len Brown, Intel Open Source Technology Center


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-01  1:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-27 21:06 [patch 3/4] sbshc: acpi_device_class "smbus_host_controller" too long akpm
2010-04-29  1:16 ` Len Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox