public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] binfmt_flat: missing argv table
@ 2011-06-15  7:30 Yoshinori Sato
  2011-06-15 15:52 ` Mike Frysinger
  0 siblings, 1 reply; 3+ messages in thread
From: Yoshinori Sato @ 2011-06-15  7:30 UTC (permalink / raw)
  To: uclinux-dev, linux-kernel

"put_user" is multiple times evalute on argument
(in asm-generic/uaccess.h).
So this code building argv table include gabage.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>

diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
index 811384b..127a198 100644
--- a/fs/binfmt_flat.c
+++ b/fs/binfmt_flat.c
@@ -144,7 +144,7 @@ static unsigned long create_flat_tables(
 	put_user(argc, sp);
 	current->mm->arg_start = (unsigned long) p;
 	while (argc-->0) {
-		put_user((unsigned long) p, argv++);
+		put_user((unsigned long) p, argv); argv++;
 		do {
 			get_user(dummy, p); p++;
 		} while (dummy);

-- 
Yoshinori Sato
<ysato@users.sourceforge.jp>

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

end of thread, other threads:[~2011-06-17  6:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-15  7:30 [PATCH] binfmt_flat: missing argv table Yoshinori Sato
2011-06-15 15:52 ` Mike Frysinger
2011-06-17  6:58   ` Yoshinori Sato

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