]> git.sur5r.net Git - openldap/commitdiff
fix ITS#5959 fix
authorPierangelo Masarati <ando@openldap.org>
Fri, 27 Feb 2009 01:45:20 +0000 (01:45 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 27 Feb 2009 01:45:20 +0000 (01:45 +0000)
servers/slapd/back-ldap/search.c

index 27e08e39eb22c0146a6f5168039f01c7ca0177f6..1bb236db2b26a7bbc6570a9e06662893c20dcd9e 100644 (file)
@@ -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] );