Skip to content
Snippets Groups Projects
Commit 7c50c4f3 authored by Quanah Gibson-Mount's avatar Quanah Gibson-Mount
Browse files

ITS#6715

parent 0a6e00c6
No related branches found
No related tags found
No related merge requests found
...@@ -11,6 +11,7 @@ OpenLDAP 2.4.24 Engineering ...@@ -11,6 +11,7 @@ OpenLDAP 2.4.24 Engineering
Fixed slapd acl parsing overflow (ITS#6611) Fixed slapd acl parsing overflow (ITS#6611)
Fixed slapd when first acl is value dependent (ITS#6693) Fixed slapd when first acl is value dependent (ITS#6693)
Fixed slapd modify to return actual error (ITS#6581) Fixed slapd modify to return actual error (ITS#6581)
Fixed slapd modify leaving rc uninitialized (ITS#6715)
Fixed slapd syncrepl reuse of presence list (ITS#6707) Fixed slapd syncrepl reuse of presence list (ITS#6707)
Fixed slapd-bdb entry cache delete failure (ITS#6577) Fixed slapd-bdb entry cache delete failure (ITS#6577)
Fixed slapd-ndb to honor rootpw setting (ITS#6661) Fixed slapd-ndb to honor rootpw setting (ITS#6661)
......
...@@ -684,7 +684,7 @@ slap_sort_vals( ...@@ -684,7 +684,7 @@ slap_sort_vals(
AttributeDescription *ad; AttributeDescription *ad;
MatchingRule *mr; MatchingRule *mr;
int istack[sizeof(int)*16]; int istack[sizeof(int)*16];
int i, j, k, l, ir, jstack, match, *ix, itmp, nvals, rc; int i, j, k, l, ir, jstack, match, *ix, itmp, nvals, rc = LDAP_SUCCESS;
int is_norm; int is_norm;
struct berval a, *cv; struct berval a, *cv;
...@@ -705,6 +705,8 @@ slap_sort_vals( ...@@ -705,6 +705,8 @@ slap_sort_vals(
ad = ml->sml_desc; ad = ml->sml_desc;
nvals = ml->sml_numvals; nvals = ml->sml_numvals;
if ( nvals <= 1 )
goto ret;
/* For Modifications, sml_nvalues is NULL if normalization wasn't needed. /* For Modifications, sml_nvalues is NULL if normalization wasn't needed.
* For Attributes, sml_nvalues == sml_values when normalization isn't needed. * For Attributes, sml_nvalues == sml_values when normalization isn't needed.
...@@ -834,15 +836,14 @@ slap_sort_vals( ...@@ -834,15 +836,14 @@ slap_sort_vals(
slap_sl_free( ix, ctx ); slap_sl_free( ix, ctx );
if ( rc != LDAP_SUCCESS ) { if ( rc == LDAP_SUCCESS && match == 0 ) {
return rc;
} else if ( match == 0 ) {
/* value exists already */ /* value exists already */
assert( i >= 0 ); assert( i >= 0 );
assert( i < nvals ); assert( i < nvals );
return LDAP_TYPE_OR_VALUE_EXISTS; rc = LDAP_TYPE_OR_VALUE_EXISTS;
} }
return LDAP_SUCCESS; ret:
return rc;
} }
/* Enter with bv->bv_len = sizeof buffer, returns with /* Enter with bv->bv_len = sizeof buffer, returns with
......
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