patch-2.4.0-test12 linux/fs/binfmt_elf.c
Next file: linux/fs/buffer.c
Previous file: linux/fs/bfs/inode.c
Back to the patch index
Back to the overall index
- Lines: 27
- Date:
Tue Nov 28 21:53:45 2000
- Orig file:
v2.4.0-test11/linux/fs/binfmt_elf.c
- Orig date:
Tue Oct 31 12:42:27 2000
diff -u --recursive --new-file v2.4.0-test11/linux/fs/binfmt_elf.c linux/fs/binfmt_elf.c
@@ -247,7 +247,7 @@
goto out;
if (!elf_check_arch(interp_elf_ex))
goto out;
- if (!interpreter->f_op->mmap)
+ if (!interpreter->f_op || !interpreter->f_op->mmap)
goto out;
/*
@@ -364,7 +364,7 @@
do_brk(0, text_data);
retval = -ENOEXEC;
- if (!interpreter->f_op->read)
+ if (!interpreter->f_op || !interpreter->f_op->read)
goto out;
retval = interpreter->f_op->read(interpreter, addr, text_data, &offset);
if (retval < 0)
@@ -789,7 +789,7 @@
/* First of all, some simple consistency checks */
if (elf_ex.e_type != ET_EXEC || elf_ex.e_phnum > 2 ||
- !elf_check_arch(&elf_ex) || !file->f_op->mmap)
+ !elf_check_arch(&elf_ex) || !file->f_op || !file->f_op->mmap)
goto out;
/* Now read in all of the header information */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)