aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/exec.c b/fs/exec.c
index f20561ff4528..2e3f7950c185 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1154,6 +1154,7 @@ int do_execve(char * filename,
1154{ 1154{
1155 struct linux_binprm *bprm; 1155 struct linux_binprm *bprm;
1156 struct file *file; 1156 struct file *file;
1157 unsigned long env_p;
1157 int retval; 1158 int retval;
1158 int i; 1159 int i;
1159 1160
@@ -1208,9 +1209,11 @@ int do_execve(char * filename,
1208 if (retval < 0) 1209 if (retval < 0)
1209 goto out; 1210 goto out;
1210 1211
1212 env_p = bprm->p;
1211 retval = copy_strings(bprm->argc, argv, bprm); 1213 retval = copy_strings(bprm->argc, argv, bprm);
1212 if (retval < 0) 1214 if (retval < 0)
1213 goto out; 1215 goto out;
1216 bprm->argv_len = env_p - bprm->p;
1214 1217
1215 retval = search_binary_handler(bprm,regs); 1218 retval = search_binary_handler(bprm,regs);
1216 if (retval >= 0) { 1219 if (retval >= 0) {