diff options
author | kan <kan@FreeBSD.org> | 2012-08-20 23:43:03 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2012-08-20 23:43:03 +0000 |
commit | 60b8513247bde8bdd1d483c5929ab0aa5c27c677 (patch) | |
tree | 6b9e5740a5f08472f09e4b2f064ad68b6d70c2a9 /libexec | |
parent | ddcb543796a91195181df47ed7acc7e6982fe747 (diff) | |
download | FreeBSD-src-60b8513247bde8bdd1d483c5929ab0aa5c27c677.zip FreeBSD-src-60b8513247bde8bdd1d483c5929ab0aa5c27c677.tar.gz |
Do not call process_nodelete with NULL object pointer.
The place where the function is called can be reached if object loading
and relocation fails too, in which case obj pointer will be NULL. Do not
call process_nodelete then, or crash will follow.
Pointy hat to: kan
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/rtld-elf/rtld.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 09abbc5..050adbb 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -2853,7 +2853,8 @@ dlopen_object(const char *name, int fd, Obj_Entry *refobj, int lo_flags, * This has to be done after we have loaded all of the * dependencies, so that we do not miss any. */ - process_nodelete(obj); + if (obj != NULL) + process_nodelete(obj); } else { /* * Bump the reference counts for objects on this DAG. If |