Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

rtld: Don't call process_nodelete with NULL object pointer

If object loading and relocation fail, the obj pointer will be NULL when
then process_nodelete function is reached.  A crash will occur if the
function is called with a null pointer, so ensure that it doesn't.

Taken-from: FreeBSD SVN 239470 (20 Aug 2012)
  • Loading branch information...
commit b76ffb9a8acba18fb936ba047ee5172af0512af6 1 parent f86b3b5
John Marino authored François Tigeot committed
Showing with 2 additions and 1 deletion.
  1. +2 −1  libexec/rtld-elf/rtld.c
View
3  libexec/rtld-elf/rtld.c
@@ -2920,7 +2920,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
Please sign in to comment.
Something went wrong with that request. Please try again.