Skip to content
Snippets Groups Projects
Commit 3a29494b authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

import ldap_sort_entries zero entry bug fix from devel.

parent da4197c7
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,8 @@ Changes included in OpenLDAP 1.2
CVS Tag: OPENLDAP_REL_ENG_1_2
Fixed slapd/ldbm/add cache set state deadlock bug
Fixed slapd/ldbm/add,modrdn,delete e_ndn handling
Fixed -lldap/ldap_init()
Fixed -lldap/ldap_init() bug
Fixed -lldap/ldap_sort_entries() zero entries bug
Updated ldap_open(3) man page to note ldap_init() is preferred.
Updated internal thread library
Updated slapd/back-shell to use void* private and pid_t
......
......@@ -93,6 +93,18 @@ ldap_sort_entries(
count = ldap_count_entries( ld, *chain );
if ( count < 0 ) {
if( ld != NULL ) {
ld->ld_errno = LDAP_PARAM_ERROR;
}
return -1;
} else if ( count < 2 ) {
/* zero or one entries -- already sorted! */
return 0;
}
if ( (et = (struct entrything *) malloc( count *
sizeof(struct entrything) )) == NULL ) {
ld->ld_errno = LDAP_NO_MEMORY;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment