![]() | |||||||||||
Messages in this thread Patch in this message |
[Sorry about duplicate, had mail problems] 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> Signed-off-by: Domen Puncer <domen@coderock.org> --- kj-domen/fs/proc/base.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN fs/proc/base.c~array_size-fs_proc_base.c.bak fs/proc/base.c --- kj/fs/proc/base.c~array_size-fs_proc_base.c.bak 2004-12-25 01:36:07.000000000 +0100 +++ kj-domen/fs/proc/base.c 2004-12-25 01:36:07.000000000 +0100 @@ -401,7 +401,7 @@ static int proc_pid_wchan(struct task_st char *modname; const char *sym_name; unsigned long wchan, size, offset; - char namebuf[128]; + char namebuf[KSYM_NAME_LEN+1]; wchan = get_wchan(task); diff -L fs/proc/base.c.bak -puN /dev/null /dev/null _ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ | ||||||||||
| Last update: 2005-03-22 14:09 [from the cache] ©2003-2008 | |||||||||||