From: Howard Chu Date: Thu, 9 Jun 2011 02:17:50 +0000 (-0700) Subject: ITS#6901 fix filter with zero-length values X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cbb6fe15b96bcab6ea9d3dab99904c8a17a6d7ef;p=openldap ITS#6901 fix filter with zero-length values --- diff --git a/servers/slapd/overlays/unique.c b/servers/slapd/overlays/unique.c index 9fbb7c672d..0889a17a47 100644 --- a/servers/slapd/overlays/unique.c +++ b/servers/slapd/overlays/unique.c @@ -963,6 +963,8 @@ build_filter( int len; ldap_bv2escaped_filter_value_x( &b[i], &bv, 1, ctx ); + if (!b[i].bv_len) + bv.bv_val = b[i].bv_val; len = snprintf( kp, ks, "(%s=%s)", ad->ad_cname.bv_val, bv.bv_val ); assert( len >= 0 && len < ks ); kp += len;