mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
If we change obj_rtld.path after initialising __progname, make sure we
change __progname to point at the new storage otherwise it ends up pointing at freed memory which leads to confusing garbled error messages.
This commit is contained in:
parent
181e65db5b
commit
f88e6caca2
1 changed files with 1 additions and 0 deletions
|
|
@ -323,6 +323,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp)
|
|||
strcmp(obj_main->interp, obj_rtld.path) != 0) {
|
||||
free(obj_rtld.path);
|
||||
obj_rtld.path = xstrdup(obj_main->interp);
|
||||
__progname = obj_rtld.path;
|
||||
}
|
||||
|
||||
digest_dynamic(obj_main, 0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue