patch-2.2.10 linux/fs/binfmt_elf.c
Next file: linux/fs/block_dev.c
Previous file: linux/fs/autofs/root.c
Back to the patch index
Back to the overall index
-  Lines: 9
-  Date:
Sun Jun 13 10:50:04 1999
-  Orig file: 
v2.2.9/linux/fs/binfmt_elf.c
-  Orig date: 
Tue May 11 13:10:30 1999
diff -u --recursive --new-file v2.2.9/linux/fs/binfmt_elf.c linux/fs/binfmt_elf.c
@@ -449,6 +449,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)