From d989f196685f863c6d562bae2dcc913257afc824 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 4 Apr 2008 00:01:02 +0000 Subject: [PATCH] ITS#5450 fully terminate value lists --- servers/slapd/back-bdb/modify.c | 2 +- servers/slapd/modify.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/servers/slapd/back-bdb/modify.c b/servers/slapd/back-bdb/modify.c index 2b01115ef4..8e63506598 100644 --- a/servers/slapd/back-bdb/modify.c +++ b/servers/slapd/back-bdb/modify.c @@ -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 ) { diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index be604ea2d6..5744b60dcc 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -589,6 +589,7 @@ int slap_mods_check( ml->sml_values[nvals] = pval; } } + ml->sml_values[nvals].bv_len = 0; ml->sml_numvals = nvals; /* -- 2.39.5