mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: domen@coderock.org
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, domen@coderock.org, wharms@bfs.de
Subject: [patch 1/2] inux-2.6.9/fs/proc/base.c: array size
Date: Sat, 25 Dec 2004 16:35:12 +0100	[thread overview]
Message-ID: <20041225153503.10FF41EA0F@trashy.coderock.org> (raw)

[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
_

             reply	other threads:[~2004-12-25 15:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-25 15:35 domen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-12-25 14:26 domen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041225153503.10FF41EA0F@trashy.coderock.org \
    --to=domen@coderock.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wharms@bfs.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome