]> git.sur5r.net Git - openldap/commitdiff
fix ITS#3346
authorPierangelo Masarati <ando@openldap.org>
Mon, 27 Sep 2004 22:04:20 +0000 (22:04 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 27 Sep 2004 22:04:20 +0000 (22:04 +0000)
servers/slapd/mods.c

index bda5738a47c774f5dbb8f7ff173b0bc72eacb185..00ae400788b0920b7851aa883c28b06c1f9e0ceb 100644 (file)
@@ -219,9 +219,13 @@ modify_delete_values(
                return LDAP_NO_SUCH_ATTRIBUTE;
        }
 
-       for ( i = 0; mod->sm_values[i].bv_val != NULL; i++ ) {
+       for ( i = 0; !BER_BVISNULL( &mod->sm_values[i] ); i++ ) {
                int     found = 0;
-               for ( j = 0; a->a_vals[j].bv_val != NULL; j++ ) {
+               for ( j = 0; !BER_BVISNULL( &a->a_vals[j] ); j++ ) {
+                       /* skip already deleted values */
+                       if ( a->a_vals[j].bv_val == &dummy ) {
+                               continue;
+                       }
 
                        if( mod->sm_nvalues ) {
                                assert( a->a_nvals );