diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2000-02-03 17:19:08 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2000-02-03 17:19:08 +0000 |
commit | d660867175822106a888f7ed88f85eb3ede9d1ae (patch) | |
tree | df3d7ae9ec15d91d217e71256087a5242b960b61 /gnu/usr.bin | |
parent | d7d5cc9c1570706b239570b7dc5e42d4ac457b97 (diff) |
Deal with empty path element in LD_LIBRARY_PATH.
o Don't try and look up an empty element in the hints file
o Convert "" to "." when adding to the list of search dirs
Perviously, an LD_LIBRARY_PATH that ended in ':' was ignored.
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r-- | gnu/usr.bin/ld/rtld/rtld.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gnu/usr.bin/ld/rtld/rtld.c b/gnu/usr.bin/ld/rtld/rtld.c index 308a12d7345..40cb78cc220 100644 --- a/gnu/usr.bin/ld/rtld/rtld.c +++ b/gnu/usr.bin/ld/rtld/rtld.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld.c,v 1.15 2000/01/11 22:27:07 millert Exp $ */ +/* $OpenBSD: rtld.c,v 1.16 2000/02/03 17:19:07 millert Exp $ */ /* $NetBSD: rtld.c,v 1.43 1996/01/14 00:35:17 pk Exp $ */ /* * Copyright (c) 1993 Paul Kranenburg @@ -1309,10 +1309,12 @@ rtfindlib(name, major, minor, usehints, ipath) ipath ? ipath : ""); while ((cp = strsep(&dp, ":")) != NULL) { - cp = findhint(name, major, minor, cp); - if (cp) { - free(lpath); - return cp; + if (*cp) { + cp = findhint(name, major, minor, cp); + if (cp) { + free(lpath); + return cp; + } } } free(lpath); |