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

ud find seg fault (ITS#148)



Full_Name: Wesley Craig
Version: 1.2.1
OS: Solaris 2.6
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (141.211.164.29)


Reproduce on Solaris 2.6 with OpenLDAP 1.2.1:

% ud
LDAP UserDirectory 1.2.1-Release (Wed Apr 21 13:15:23 EDT 1999)

  Enter a command.  If you need help, type 'h' or '?' and hit RETURN.

* find
  Locate whose entry? 
Segmentation Fault (core dumped)
%

Fix is in clients/ud/main.c, line 230.  printf refers to "cp" which points
to second argument is there was one.  When there's not, cp is NULL, causing
some
printf's to core.  My fix, check for NULL, give message "Could not complete
find."
A better error message would get what the user typed at the "Locate whose
entry?"
prompt.  This is hard, since it's not local to do_command().

:wes