[Date Prev][Date Next] [Chronological] [Thread] [Top]

ud dumps core when it can't bind to slapd due to connection refused (ITS#43)



Full_Name: Heiko W.Rupp
Version: 1.1.2
OS: NetBSD 1.3.2
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (193.141.42.125)



* bind
  What is your name or user id? hwr
ldap_search_s: Can't contact LDAP server
Segmentation fault (core dumped)

shanagary!1083> gdb /usr/local/bin/ud ud.core

#0  0x1680d in ber_free (ber=0x0, freebuf=1) at io.c:264
264             if ( freebuf && ber->ber_buf != NULL )
(gdb) bt
#0  0x1680d in ber_free (ber=0x0, freebuf=1) at io.c:264
#1  0xe848 in ldap_msgfree (lm=0x1fbc0) at result.c:626
#2  0x3ed3 in find (who=0x1dda8 "hwr", quiet=1) at find.c:260
#3  0x727d in auth (who=0x0, implicit=0) at auth.c:125
#4  0x23e3 in do_commands () at main.c:238
#5  0x1d0d in main (argc=1, argv=0xefbfd728) at main.c:158

This turns out to be a reference of a NULL pointr in lber

Possible Fix:

shanagary!668> diff io.c,1 io.c
264c264
<       if ( freebuf && ber->ber_buf != NULL )
---
>       if ( freebuf && ber && ber->ber_buf != NULL )
shanagary!669>