Date: Fri, 22 Jul 2016 17:24:36 +0000 (UTC) From: Bryan Drewery <bdrewery@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303193 - stable/11/libexec/rtld-elf Message-ID: <201607221724.u6MHOa3A092779@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bdrewery Date: Fri Jul 22 17:24:36 2016 New Revision: 303193 URL: https://svnweb.freebsd.org/changeset/base/303193 Log: MFC r302908: Fix dlsym(RTLD_NEXT) handling to only return the next library in last library cases. Approved by: re (gjb) Modified: stable/11/libexec/rtld-elf/rtld.c Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/rtld.c ============================================================================== --- stable/11/libexec/rtld-elf/rtld.c Fri Jul 22 17:22:37 2016 (r303192) +++ stable/11/libexec/rtld-elf/rtld.c Fri Jul 22 17:24:36 2016 (r303193) @@ -3291,7 +3291,7 @@ do_dlsym(void *handle, const char *name, handle == RTLD_SELF) { /* ... caller included */ if (handle == RTLD_NEXT) obj = globallist_next(obj); - TAILQ_FOREACH_FROM(obj, &obj_list, next) { + for (; obj != NULL; obj = TAILQ_NEXT(obj, next)) { if (obj->marker) continue; res = symlook_obj(&req, obj);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607221724.u6MHOa3A092779>