diff options
Diffstat (limited to 'fs/binfmt_elf_fdpic.c')
-rw-r--r-- | fs/binfmt_elf_fdpic.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c index 9d62fbad3d4b..4739506fb083 100644 --- a/fs/binfmt_elf_fdpic.c +++ b/fs/binfmt_elf_fdpic.c | |||
@@ -621,8 +621,8 @@ static int create_elf_fdpic_tables(struct linux_binprm *bprm, | |||
621 | p = (char __user *) current->mm->arg_start; | 621 | p = (char __user *) current->mm->arg_start; |
622 | for (loop = bprm->argc; loop > 0; loop--) { | 622 | for (loop = bprm->argc; loop > 0; loop--) { |
623 | __put_user((elf_caddr_t) p, argv++); | 623 | __put_user((elf_caddr_t) p, argv++); |
624 | len = strnlen_user(p, PAGE_SIZE * MAX_ARG_PAGES); | 624 | len = strnlen_user(p, MAX_ARG_STRLEN); |
625 | if (!len || len > PAGE_SIZE * MAX_ARG_PAGES) | 625 | if (!len || len > MAX_ARG_STRLEN) |
626 | return -EINVAL; | 626 | return -EINVAL; |
627 | p += len; | 627 | p += len; |
628 | } | 628 | } |
@@ -633,8 +633,8 @@ static int create_elf_fdpic_tables(struct linux_binprm *bprm, | |||
633 | current->mm->env_start = (unsigned long) p; | 633 | current->mm->env_start = (unsigned long) p; |
634 | for (loop = bprm->envc; loop > 0; loop--) { | 634 | for (loop = bprm->envc; loop > 0; loop--) { |
635 | __put_user((elf_caddr_t)(unsigned long) p, envp++); | 635 | __put_user((elf_caddr_t)(unsigned long) p, envp++); |
636 | len = strnlen_user(p, PAGE_SIZE * MAX_ARG_PAGES); | 636 | len = strnlen_user(p, MAX_ARG_STRLEN); |
637 | if (!len || len > PAGE_SIZE * MAX_ARG_PAGES) | 637 | if (!len || len > MAX_ARG_STRLEN) |
638 | return -EINVAL; | 638 | return -EINVAL; |
639 | p += len; | 639 | p += len; |
640 | } | 640 | } |