public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: traps_32.c - use KSYM_NAME_LEN instead of numeric value
@ 2008-03-15  8:34 Cyrill Gorcunov
  2008-03-21 11:37 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Cyrill Gorcunov @ 2008-03-15  8:34 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Andrew Morton

It's safer to use KSYM_NAME_LEN instead of numeric constant
because we could get buffer overrun someday if KSYM_NAME_LEN
would be changed to a bigger value.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---

I've patched 64bit version but forgot about 32bit. So
lets fix it too.

Index: linux-2.6.git/arch/x86/kernel/traps_32.c
===================================================================
--- linux-2.6.git.orig/arch/x86/kernel/traps_32.c	2008-02-09 22:27:13.000000000 +0300
+++ linux-2.6.git/arch/x86/kernel/traps_32.c	2008-03-15 11:21:16.000000000 +0300
@@ -109,7 +109,7 @@ void printk_address(unsigned long addres
 	const char *symname;
 	char *modname;
 	char *delim = ":";
-	char namebuf[128];
+	char namebuf[KSYM_NAME_LEN];
 	char reliab[4] = "";
 
 	symname = kallsyms_lookup(address, &symsize, &offset,

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

end of thread, other threads:[~2008-03-21 11:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-15  8:34 [PATCH] x86: traps_32.c - use KSYM_NAME_LEN instead of numeric value Cyrill Gorcunov
2008-03-21 11:37 ` Ingo Molnar

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