[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kernel-janitors
Subject:    [KJ] inux-2.6.9/fs/proc/base.c: array size
From:       walter harms <wharms () bfs ! de>
Date:       2004-12-20 12:56:20
Message-ID: 200412201356.20861.wharms () bfs ! de
[Download RAW message or body]

Hi list,
i was looking for arrays (and possible overflows) when i noticed that
proc_pid_wchan() uses a 128-Byte array for something that can change its size
via define.

Fix possible overflow: rewrite arraysize with correct constant

re,
walter


signed-off-by: walter harms <wharms@bfs.de>


--- linux-2.6.9/fs/proc/base.c.bak	2004-12-18 21:13:31.000000000 +0100
+++ linux-2.6.9/fs/proc/base.c	2004-12-18 21:32:37.000000000 +0100
@@ -400,7 +400,7 @@
 	char *modname;
 	const char *sym_name;
 	unsigned long wchan, size, offset;
-	char namebuf[128];
+	char namebuf[KSYM_NAME_LEN+1];
 
 	wchan = get_wchan(task);
 


_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic