summaryrefslogtreecommitdiffstats
path: root/fs/binfmt_misc.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-08-08 12:37:17 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-08-08 12:37:17 +0000
commit9aa9eb41942b918f385ccabd2efdd6e7e4232165 (patch)
tree20bec7da036d31ec185dfc1dcc00753c7ac9b170 /fs/binfmt_misc.c
parent87075e049581f880f01eb0b41aa6ac807b299e35 (diff)
Merge with Linux 2.4.0-test6-pre1.
Diffstat (limited to 'fs/binfmt_misc.c')
-rw-r--r--fs/binfmt_misc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c
index f9c30df1b..c16536479 100644
--- a/fs/binfmt_misc.c
+++ b/fs/binfmt_misc.c
@@ -182,7 +182,7 @@ static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs)
{
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 @@ static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs)
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 @@ static int proc_write_register(struct file *file, const char *buffer,
/* 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;