提交 9e17b71f 编写于 作者: R Rich Felker

fix stale pointer issue in dynamic linker with dlopen

上级 06933cc7
...@@ -473,6 +473,7 @@ void *__dynlink(int argc, char **argv, size_t *got) ...@@ -473,6 +473,7 @@ void *__dynlink(int argc, char **argv, size_t *got)
*libc->prev->next = *libc; *libc->prev->next = *libc;
libc = libc->prev->next; libc = libc->prev->next;
if (libc->next) libc->next->prev = libc; if (libc->next) libc->next->prev = libc;
if (tail == &lib) tail = libc;
} else { } else {
free_all(head); free_all(head);
free(sys_path); free(sys_path);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册