]> git.sur5r.net Git - openldap/commitdiff
ITS#5450 fully terminate value lists
authorHoward Chu <hyc@openldap.org>
Fri, 4 Apr 2008 00:01:02 +0000 (00:01 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 4 Apr 2008 00:01:02 +0000 (00:01 +0000)
servers/slapd/back-bdb/modify.c
servers/slapd/modify.c

index 2b01115ef4937fb749318c1bcf13fb7f4937766a..8e63506598e3f67f1038b11d9554a70cd3715371 100644 (file)
@@ -283,7 +283,7 @@ int bdb_modify_internal(
                                /* attribute was completely deleted */
                                vals = ap->a_nvals;
                        }
-                       if ( !BER_BVISEMPTY( vals )) {
+                       if ( !BER_BVISNULL( vals )) {
                                rc = bdb_index_values( op, tid, ap->a_desc,
                                        vals, e->e_id, SLAP_INDEX_DELETE_OP );
                                if ( rc != LDAP_SUCCESS ) {
index be604ea2d61bc66bc21421b588073724ee36f937..5744b60dcc446320465a23a10c8abeb4aa3dfef4 100644 (file)
@@ -589,6 +589,7 @@ int slap_mods_check(
                                        ml->sml_values[nvals] = pval;
                                }
                        }
+                       ml->sml_values[nvals].bv_len = 0;
                        ml->sml_numvals = nvals;
 
                        /*