lkml.org 
[lkml]   [2011]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] binfmt_flat: missing argv table
"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>


\
 
 \ /
  Last update: 2011-06-15 09:51    [W:0.035 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site