diff --git a/servers/slapd/ad.c b/servers/slapd/ad.c index 8d77c7ffb7..29a16f2292 100644 --- a/servers/slapd/ad.c +++ b/servers/slapd/ad.c @@ -98,7 +98,7 @@ int slap_bv2ad( if (options != NULL) desc.ad_cname.bv_len = options - name; else - desc.ad_cname.bv_len = strlen(name); + desc.ad_cname.bv_len = bv->bv_len; desc.ad_flags = SLAP_DESC_NONE; desc.ad_lang.bv_len = 0;