|
@@ -759,16 +759,16 @@ static int load_elf_binary(struct linux_binprm *bprm)
|
|
*/
|
|
*/
|
|
would_dump(bprm, interpreter);
|
|
would_dump(bprm, interpreter);
|
|
|
|
|
|
- retval = kernel_read(interpreter, 0, bprm->buf,
|
|
|
|
- BINPRM_BUF_SIZE);
|
|
|
|
- if (retval != BINPRM_BUF_SIZE) {
|
|
|
|
|
|
+ /* Get the exec headers */
|
|
|
|
+ retval = kernel_read(interpreter, 0,
|
|
|
|
+ (void *)&loc->interp_elf_ex,
|
|
|
|
+ sizeof(loc->interp_elf_ex));
|
|
|
|
+ if (retval != sizeof(loc->interp_elf_ex)) {
|
|
if (retval >= 0)
|
|
if (retval >= 0)
|
|
retval = -EIO;
|
|
retval = -EIO;
|
|
goto out_free_dentry;
|
|
goto out_free_dentry;
|
|
}
|
|
}
|
|
|
|
|
|
- /* Get the exec headers */
|
|
|
|
- loc->interp_elf_ex = *((struct elfhdr *)bprm->buf);
|
|
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
elf_ppnt++;
|
|
elf_ppnt++;
|