about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-08-25 17:40:27 -0400
committerRich Felker <dalias@aerifal.cx>2012-08-25 17:40:27 -0400
commita5d6199d091aad750b1fc325240a141a88ee770e (patch)
treeac3e081139776dda5c602d10763bd036262d371b
parentdbcb3ad9255c71cbfeb4e9d65d56a8f49dcda6a6 (diff)
downloadmusl-a5d6199d091aad750b1fc325240a141a88ee770e.tar.gz
musl-a5d6199d091aad750b1fc325240a141a88ee770e.tar.xz
musl-a5d6199d091aad750b1fc325240a141a88ee770e.zip
fix bug in gnu hash lookup on dlsym(handle, name) lookups
wrong hash was being passed; just a copy/paste error. did not affect
lookups in the global namespace; this is probably why it was not
caught in testing.
-rw-r--r--src/ldso/dynlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c
index 981288c3..c733dc5d 100644
--- a/src/ldso/dynlink.c
+++ b/src/ldso/dynlink.c
@@ -877,7 +877,7 @@ static void *do_dlsym(struct dso *p, const char *s, void *ra)
 	if (p->deps) for (i=0; p->deps[i]; i++) {
 		if (p->deps[i]->ghashtab) {
 			if (!gh) gh = gnu_hash(s);
-			sym = gnu_lookup(s, h, p->deps[i]);
+			sym = gnu_lookup(s, gh, p->deps[i]);
 		} else {
 			if (!h) h = sysv_hash(s);
 			sym = sysv_lookup(s, h, p->deps[i]);