summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-aout
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1996-10-10 04:10:32 +0000
committerjdp <jdp@FreeBSD.org>1996-10-10 04:10:32 +0000
commit14b86859f7b8d545af6bde012c32c4ee3b30889c (patch)
tree4d4fb7327a410f2b765ca61ac23ead83c4f717f1 /libexec/rtld-aout
parentcf6d4e3c7e7464be3bb610a15e3df35f1a9242fa (diff)
downloadFreeBSD-src-14b86859f7b8d545af6bde012c32c4ee3b30889c.zip
FreeBSD-src-14b86859f7b8d545af6bde012c32c4ee3b30889c.tar.gz
Fix a bug that caused a segmentation violation if dlsym() was called
with its first argument equal to NULL.
Diffstat (limited to 'libexec/rtld-aout')
-rw-r--r--libexec/rtld-aout/rtld.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/rtld-aout/rtld.c b/libexec/rtld-aout/rtld.c
index 28f7453..fc1024b 100644
--- a/libexec/rtld-aout/rtld.c
+++ b/libexec/rtld-aout/rtld.c
@@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: rtld.c,v 1.36 1996/10/01 11:54:38 peter Exp $
+ * $Id: rtld.c,v 1.37 1996/10/01 16:09:18 nate Exp $
*/
#include <sys/param.h>
@@ -1872,7 +1872,7 @@ __dlsym(fd, sym)
/*
* Restrict search to passed map if dlopen()ed.
*/
- if (LM_PRIVATE(smp)->spd_flags & RTLD_DL)
+ if (smp != NULL && LM_PRIVATE(smp)->spd_flags & RTLD_DL)
src_map = smp;
np = lookup(sym, &src_map, 1);
OpenPOWER on IntegriCloud