public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] buffer array one byte too short in drivers/acpi/system.c
@ 2008-03-06 14:30 Johann Felix Soden
  2008-03-11  7:05 ` Len Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Johann Felix Soden @ 2008-03-06 14:30 UTC (permalink / raw)
  To: Len Brown; +Cc: linux-acpi

From: Johann Felix Soden <johfel@users.sourceforge.net>

Since "ff_gbl_lock" has a length of 10 chars and is copied with sprintf to
char buffer[10], there is a problem because of the closing zero byte. We
need char buffer[11].

Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net>
---
 drivers/acpi/system.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/system.c b/drivers/acpi/system.c
index 55cf4c0..037b679 100644
--- a/drivers/acpi/system.c
+++ b/drivers/acpi/system.c
@@ -319,7 +319,7 @@ void acpi_irq_stats_init(void)
 		goto fail;
 
 	for (i = 0; i < num_counters; ++i) {
-		char buffer[10];
+		char buffer[11];
 		char *name;
 
 		if (i < num_gpes)
-- 
1.5.4.3




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

end of thread, other threads:[~2008-03-12 22:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-06 14:30 [PATCH] buffer array one byte too short in drivers/acpi/system.c Johann Felix Soden
2008-03-11  7:05 ` Len Brown
2008-03-11 15:44   ` Johann Felix Soden
2008-03-12 22:23     ` Len Brown

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