From 0524589f7fc05e5f79e3cc2e28bdc234b411fa39 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 24 Sep 1999 04:19:37 +0000 Subject: [PATCH] ITS#303: value_add_fast() empty value bug. Ignore empty value. This is technical incorrect, but we don't have the codes in place to correctly handle empty values yet. --- servers/slapd/value.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/servers/slapd/value.c b/servers/slapd/value.c index 58f1711d1c..2a0ea16009 100644 --- a/servers/slapd/value.c +++ b/servers/slapd/value.c @@ -39,10 +39,10 @@ value_add_fast( *maxvals * sizeof(struct berval *) ); } - for ( i = 0, j = 0; i < naddvals; i++, j++ ) { + for ( i = 0, j = 0; i < naddvals; i++ ) { if ( addvals[i]->bv_len > 0 ) { (*vals)[nvals + j] = ber_bvdup( addvals[i] ); - if( (*vals)[nvals + j] == NULL ) break; + if( (*vals)[nvals + j] != NULL ) j++; } } (*vals)[nvals + j] = NULL; -- 2.39.5