aboutsummaryrefslogtreecommitdiffstats
path: root/fs/binfmt_elf.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/binfmt_elf.c')
-rw-r--r--fs/binfmt_elf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 83732fef510d..bdb201230bae 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1599,6 +1599,8 @@ static int fill_files_note(struct memelfnote *note)
1599 1599
1600 /* *Estimated* file count and total data size needed */ 1600 /* *Estimated* file count and total data size needed */
1601 count = current->mm->map_count; 1601 count = current->mm->map_count;
1602 if (count > UINT_MAX / 64)
1603 return -EINVAL;
1602 size = count * 64; 1604 size = count * 64;
1603 1605
1604 names_ofs = (2 + 3 * count) * sizeof(data[0]); 1606 names_ofs = (2 + 3 * count) * sizeof(data[0]);