From: Pierangelo Masarati Date: Fri, 27 Feb 2009 01:45:20 +0000 (+0000) Subject: fix ITS#5959 fix X-Git-Tag: ACLCHECK_0~777 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7fe91339dfd08d6c4168c8493f5c1f0faca6ba54;p=openldap fix ITS#5959 fix --- diff --git a/servers/slapd/back-ldap/search.c b/servers/slapd/back-ldap/search.c index 27e08e39eb..1bb236db2b 100644 --- a/servers/slapd/back-ldap/search.c +++ b/servers/slapd/back-ldap/search.c @@ -766,7 +766,9 @@ ldap_build_entry( } attr->a_vals[i] = attr->a_vals[last]; BER_BVZERO( &attr->a_vals[last] ); + i--; } + } else if ( pretty ) { LBER_FREE( attr->a_vals[i].bv_val ); attr->a_vals[i] = pval; @@ -801,6 +803,7 @@ ldap_build_entry( } attr->a_vals[i] = attr->a_vals[last]; BER_BVZERO( &attr->a_vals[last] ); + i--; } } BER_BVZERO( &attr->a_nvals[i] );