From b2cd66c0d874085b18d23d0c7ae0e6ae68949be5 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Mon, 27 Sep 2004 22:04:20 +0000 Subject: [PATCH] fix ITS#3346 --- servers/slapd/mods.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/servers/slapd/mods.c b/servers/slapd/mods.c index bda5738a47..00ae400788 100644 --- a/servers/slapd/mods.c +++ b/servers/slapd/mods.c @@ -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 ); -- 2.39.5