From 7fe91339dfd08d6c4168c8493f5c1f0faca6ba54 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Fri, 27 Feb 2009 01:45:20 +0000 Subject: [PATCH] fix ITS#5959 fix --- servers/slapd/back-ldap/search.c | 3 +++ 1 file changed, 3 insertions(+) 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] ); -- 2.39.5