Read max_stack_flags from correct object.

'obj' is not initialized here.

Reviewed by:	kib
MFC after:	1 week
Sponsored by:	DARPA / AFRL
This commit is contained in:
jhb 2017-08-30 18:22:52 +00:00
parent af76621b37
commit 02b4490919

View File

@ -571,7 +571,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp)
close(fd);
if (obj_main == NULL)
rtld_die();
max_stack_flags = obj->stack_flags;
max_stack_flags = obj_main->stack_flags;
} else { /* Main program already loaded. */
dbg("processing main program's program header");
assert(aux_info[AT_PHDR] != NULL);