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

(ITS#4679) Null pointer dereferences in sortctrl.c



Full_Name: Ian Puleston
Version: 2.3.27
OS: VxWorks
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (67.115.118.49)


Running Coverity on our code which includes a port of the OpenLDAP client
revealed two potential null pointer dereferences in libldap/sortctrl.c that are
still present in the latest version (currently 2.3.27):

In function ldap_parse_sort_control:

	if (ld == NULL) {
		ld->ld_errno = LDAP_PARAM_ERROR;
		return(ld->ld_errno);
	}

In function ldap_create_sort_control:

	if ( (ld == NULL) || (keyList == NULL) || (ctrlp == NULL) ) {
		ld->ld_errno = LDAP_PARAM_ERROR;
		return(ld->ld_errno);
	}

Both of these cases use the ld pointer after it has been found to be NULL.