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

ldap_modify (ITS#238)

Full_Name: Howard B Young
Version: 1.2.4
OS: solaris 2.6
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (


  Starting with 1.2.4, a call to ldap_modify that contains a LDAPMod with a
LDAP_MOD_DELETE request that tries to delete an attribute by passing a NULL
mod_values or mod_bvalues causes the server to die with a segmentation error.

Looks like the routine index_change_values in server/slapd/back-ldbm/index.c
successfully performs an ldbm_cache_open and looks for attibutes to be deleted
means of a for loop that starts

   for (i = 0; vals[i] != NULL; i++) {

without checking for the possibilty that vals itself is NULL. Changing the line
   for (i = 0; (vals != NULL) && (vals[i] !=NULL); i++) {

corrects the problem.