patch-2.4.0-test6 linux/fs/binfmt_misc.c
Next file: linux/fs/binfmt_script.c
Previous file: linux/fs/binfmt_elf.c
Back to the patch index
Back to the overall index
- Lines: 29
- Date:
Mon Jul 31 10:51:09 2000
- Orig file:
v2.4.0-test5/linux/fs/binfmt_misc.c
- Orig date:
Mon Jul 10 16:47:25 2000
diff -u --recursive --new-file v2.4.0-test5/linux/fs/binfmt_misc.c linux/fs/binfmt_misc.c
@@ -182,7 +182,7 @@
{
struct binfmt_entry *fmt;
struct file * file;
- char iname[128];
+ char iname[BINPRM_BUF_SIZE];
char *iname_addr = iname;
int retval;
@@ -194,8 +194,8 @@
read_lock(&entries_lock);
fmt = check_file(bprm);
if (fmt) {
- strncpy(iname, fmt->interpreter, 127);
- iname[127] = '\0';
+ strncpy(iname, fmt->interpreter, BINPRM_BUF_SIZE - 1);
+ iname[BINPRM_BUF_SIZE - 1] = '\0';
}
read_unlock(&entries_lock);
if (!fmt)
@@ -324,7 +324,7 @@
/* more sanity checks */
if (err || !(!cnt || (!(--cnt) && (*sp == '\n'))) ||
- (e->size < 1) || ((e->size + e->offset) > 127) ||
+ (e->size < 1) || ((e->size + e->offset) > (BINPRM_BUF_SIZE - 1)) ||
!(e->proc_name) || !(e->interpreter) || entry_proc_setup(e))
goto free_err;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)