From: Kurt Zeilenga Date: Sun, 11 Aug 2002 20:26:01 +0000 (+0000) Subject: consistently reduce string_expand bv_len by 1 X-Git-Tag: NO_SLAP_OP_BLOCKS~1241 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f10699865ee147c5bc009211e626173929414490;p=openldap consistently reduce string_expand bv_len by 1 --- diff --git a/servers/slapd/acl.c b/servers/slapd/acl.c index 449138fae0..3b1900fd27 100644 --- a/servers/slapd/acl.c +++ b/servers/slapd/acl.c @@ -764,7 +764,7 @@ dn_match_cleanup:; if ( b->a_domain_expand ) { struct berval bv; - bv.bv_len = sizeof(buf); + bv.bv_len = sizeof(buf) - 1; bv.bv_val = buf; string_expand(&bv, &b->a_domain_pat, e->e_ndn, matches); @@ -1670,7 +1670,7 @@ aci_group_member ( if (grp_oc != NULL && grp_ad != NULL ) { char buf[ACL_BUF_SIZE]; struct berval bv, ndn; - bv.bv_len = sizeof( buf ); + bv.bv_len = sizeof( buf ) - 1; bv.bv_val = (char *)&buf; string_expand(&bv, &subjdn, e->e_ndn, matches); if ( dnNormalize2(NULL, &bv, &ndn) == LDAP_SUCCESS ) { @@ -1917,7 +1917,7 @@ regex_matches( struct berval bv; int rc; - bv.bv_len = sizeof(newbuf); + bv.bv_len = sizeof(newbuf) - 1; bv.bv_val = newbuf; if(str == NULL) str = "";