From 9151bb8d2db6a6f8fc9420adb6b9deb8b278cf9c Mon Sep 17 00:00:00 2001 From: John Polstra Date: Thu, 10 Oct 1996 04:10:32 +0000 Subject: Fix a bug that caused a segmentation violation if dlsym() was called with its first argument equal to NULL. --- libexec/rtld-aout/rtld.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libexec') diff --git a/libexec/rtld-aout/rtld.c b/libexec/rtld-aout/rtld.c index 28f74539a3cd1..fc1024b1f5f06 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 @@ -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); -- cgit v1.3