Commit 2eba34a7 authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

import fix to ITS#5136

parent fe87c957
......@@ -5,6 +5,7 @@ OpenLDAP 2.3.39 Engineering
Fixed slapd password_hash config order (ITS#5082)
Fixed slapd slap_mods_check bug (ITS#5119)
Fixed slapd ACL sets memory handling (ITS#4873)
Fixed slapd ordered values add normalization issue (ITS#5136)
Fixed slapd-bdb DB_CONFIG conversion bug (ITS#5118)
Fixed slapd-ldap SASL idassert w/o autchId
Fixed slapd-sql concurrency issue (ITS#5095)
......
......@@ -697,7 +697,21 @@ ordered_value_add(
}
new = ch_malloc( (anum+vnum+1) * sizeof(struct berval));
if ( a->a_nvals && a->a_nvals != a->a_vals ) {
/* sanity check: if normalized modifications come in, either
* no values are present or normalized existing values differ
* from non-normalized; if no normalized modifications come in,
* either no values are present or normalized existing values
* don't differ from non-normalized */
if ( nvals != NULL ) {
assert( nvals != vals );
assert( a->a_nvals == NULL || a->a_nvals != a->a_vals );
} else {
assert( a->a_nvals == NULL || a->a_nvals == a->a_vals );
}
if ( ( a->a_nvals && a->a_nvals != a->a_vals ) || nvals != NULL ) {
nnew = ch_malloc( (anum+vnum+1) * sizeof(struct berval));
/* Shouldn't happen... */
if ( !nvals ) nvals = vals;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment