patch-2.3.10 linux/fs/binfmt_elf.c
Next file: linux/fs/coda/cache.c
Previous file: linux/fs/binfmt_aout.c
Back to the patch index
Back to the overall index
- Lines: 9
- Date:
Mon Jul 5 19:59:55 1999
- Orig file:
v2.3.9/linux/fs/binfmt_elf.c
- Orig date:
Fri Jun 18 08:01:10 1999
diff -u --recursive --new-file v2.3.9/linux/fs/binfmt_elf.c linux/fs/binfmt_elf.c
@@ -443,6 +443,8 @@
retval = -ENOMEM;
size = elf_ex.e_phentsize * elf_ex.e_phnum;
+ if (size > 65536)
+ goto out;
elf_phdata = (struct elf_phdr *) kmalloc(size, GFP_KERNEL);
if (!elf_phdata)
goto out;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)