Commit 31f73ed3 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] fix error case in binfmt_elf.c:load_elf_interp

From: Roland McGrath <roland@redhat.com>

Julie DeWandel noticed that in the error case where elf_map has failed,
load_elf_interp will (at the out_close: label) return the `error' variable,
but that will contain the result of a prior operation and not the error
number from elf_map.
parent 3d122f30
......@@ -349,6 +349,7 @@ static unsigned long load_elf_interp(struct elfhdr * interp_elf_ex,
elf_type |= MAP_FIXED;
map_addr = elf_map(interpreter, load_addr + vaddr, eppnt, elf_prot, elf_type);
error = map_addr;
if (BAD_ADDR(map_addr))
goto out_close;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment