From: Pierangelo Masarati Date: Sat, 27 May 2006 19:14:39 +0000 (+0000) Subject: fix DN-valued (and likely others not handled in the switch) attrs duplication (occcur... X-Git-Tag: OPENLDAP_REL_ENG_2_4_3ALPHA~9^2~208 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1d24564f9d7714e73a07b2ebe013096db584dda0;p=openldap fix DN-valued (and likely others not handled in the switch) attrs duplication (occcurred with olcDbSuffix during attrs_dup(); please check) --- diff --git a/servers/slapd/config.c b/servers/slapd/config.c index ef8c522472..ddfc2af581 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -453,14 +453,19 @@ config_get_vals(ConfigTable *cf, ConfigArgs *c) return 1; } break; + default: + bv.bv_val = NULL; + break; } if (bv.bv_val == c->log && bv.bv_len >= sizeof( c->log ) ) { return 1; } - if (( cf->arg_type & ARGS_TYPES ) == ARG_STRING ) + if (( cf->arg_type & ARGS_TYPES ) == ARG_STRING ) { ber_bvarray_add(&c->rvalue_vals, &bv); - else + } else if ( !BER_BVISNULL( &bv ) ) { value_add_one(&c->rvalue_vals, &bv); + } + /* else: maybe c->rvalue_vals already set? */ } return rc; }