summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2009-03-28 15:54:08 +0000
committerkib <kib@FreeBSD.org>2009-03-28 15:54:08 +0000
commit1552563928ae5927fc77974bb0a2101970c938bb (patch)
tree3bcc294280eed7aebfbe5f0915ea79e513e85f89 /libexec
parent705fd8f6f99d1e142bebf8955bca550c389971b1 (diff)
downloadFreeBSD-src-1552563928ae5927fc77974bb0a2101970c938bb.zip
FreeBSD-src-1552563928ae5927fc77974bb0a2101970c938bb.tar.gz
Do not dereference NULL pointer. refobj is NULL for the objects that are
preloaded. Reported and tested by: ed
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rtld-elf/rtld.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index 823427a..d98ade7 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -1125,7 +1125,7 @@ find_library(const char *xname, const Obj_Entry *refobj)
xname);
return NULL;
}
- if (refobj->z_origin)
+ if (refobj != NULL && refobj->z_origin)
return origin_subst(xname, refobj->origin_path);
else
return xstrdup(xname);
OpenPOWER on IntegriCloud