]> git.sur5r.net Git - openldap/commitdiff
ITS#6901 fix filter with zero-length values
authorHoward Chu <hyc@openldap.org>
Thu, 9 Jun 2011 02:17:50 +0000 (19:17 -0700)
committerHoward Chu <hyc@openldap.org>
Thu, 9 Jun 2011 02:17:50 +0000 (19:17 -0700)
servers/slapd/overlays/unique.c

index 9fbb7c672d737d69b40bd8873bed4bbc54524b38..0889a17a47bcf32e4a67768b432b3d17dbbb090d 100644 (file)
@@ -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;