summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf
diff options
context:
space:
mode:
authormdodd <mdodd@FreeBSD.org>2003-06-18 16:17:13 +0000
committermdodd <mdodd@FreeBSD.org>2003-06-18 16:17:13 +0000
commitaf80699b544a17d4501ac883aa5180488508f27a (patch)
treeb28d7d5ee7b3ae6d36dd9e99f8dc757a1a921f91 /libexec/rtld-elf
parentfb686f341c75d03987fa2d1a6b82f9f01e641ffb (diff)
downloadFreeBSD-src-af80699b544a17d4501ac883aa5180488508f27a.zip
FreeBSD-src-af80699b544a17d4501ac883aa5180488508f27a.tar.gz
Avoid a NULL pointer dereference.
Diffstat (limited to 'libexec/rtld-elf')
-rw-r--r--libexec/rtld-elf/rtld.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index 0dea9e6..6bc1f77 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -815,7 +815,8 @@ find_library(const char *xname, const Obj_Entry *refobj)
}
#ifdef WITH_LIBMAP
- if (libmap_disable || (name = lm_find(refobj->path, xname)) == NULL)
+ if (libmap_disable || (refobj == NULL) ||
+ (name = lm_find(refobj->path, xname)) == NULL)
#endif
name = (char *)xname;
OpenPOWER on IntegriCloud