patch-2.3.5 linux/fs/binfmt_script.c

Next file: linux/fs/coda/cnode.c
Previous file: linux/fs/binfmt_misc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.4/linux/fs/binfmt_script.c linux/fs/binfmt_script.c
@@ -66,16 +66,17 @@
 	 * user environment and arguments are stored.
 	 */
 	remove_arg_zero(bprm);
-	bprm->p = copy_strings(1, &bprm->filename, bprm->page, bprm->p, 2);
+	retval = copy_strings_kernel(1, &bprm->filename, bprm);
+	if (retval < 0) return retval; 
 	bprm->argc++;
 	if (i_arg) {
-		bprm->p = copy_strings(1, &i_arg, bprm->page, bprm->p, 2);
+		retval = copy_strings_kernel(1, &i_arg, bprm);
+		if (retval < 0) return retval; 
 		bprm->argc++;
 	}
-	bprm->p = copy_strings(1, &i_name, bprm->page, bprm->p, 2);
+	retval = copy_strings_kernel(1, &i_name, bprm);
+	if (retval) return retval; 
 	bprm->argc++;
-	if (!bprm->p) 
-		return -E2BIG;
 	/*
 	 * OK, now restart the process with the interpreter's dentry.
 	 */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)