From: Kurt Zeilenga Date: Tue, 22 Aug 2000 22:34:37 +0000 (+0000) Subject: Fix substring any filters X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~2203 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=67ddc87e68add0c34e8ab043de2fa552de8d9c7c;p=openldap Fix substring any filters --- diff --git a/servers/slapd/schema_init.c b/servers/slapd/schema_init.c index 19058dce9a..6c14e783c3 100644 --- a/servers/slapd/schema_init.c +++ b/servers/slapd/schema_init.c @@ -1127,8 +1127,10 @@ int caseExactIA5SubstringsFilter( value = sa->sa_any[i]; - for(j=0; jsa_any[i]->bv_len; j+= SLAP_INDEX_SUBSTR_STEP ) { - + for(j=0; + j <= value->bv_len - SLAP_INDEX_SUBSTR_MAXLEN; + j += SLAP_INDEX_SUBSTR_STEP ) + { lutil_MD5Init( &MD5context ); if( prefix != NULL && prefix->bv_len > 0 ) { lutil_MD5Update( &MD5context, @@ -1716,7 +1718,10 @@ int caseIgnoreIA5SubstringsFilter( value = ber_bvdup( sa->sa_any[i] ); ldap_pvt_str2upper( value->bv_val ); - for(j=0; jsa_any[i]->bv_len; j+= SLAP_INDEX_SUBSTR_STEP ) { + for(j=0; + j <= value->bv_len - SLAP_INDEX_SUBSTR_MAXLEN; + j += SLAP_INDEX_SUBSTR_STEP ) + { lutil_MD5Init( &MD5context ); if( prefix != NULL && prefix->bv_len > 0 ) { lutil_MD5Update( &MD5context,