From: Kurt Zeilenga Date: Fri, 16 Jul 1999 22:26:57 +0000 (+0000) Subject: fix substring_comp_candidates logic if intersection of candidates X-Git-Tag: OPENLDAP_REL_ENG_2_BP~102 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f92d01c2bbf038dac5ed49d0905730b35f215cc9;p=openldap fix substring_comp_candidates logic if intersection of candidates is ever empty. See ITS#228. --- diff --git a/servers/slapd/back-bdb2/filterindex.c b/servers/slapd/back-bdb2/filterindex.c index d5cc90d95f..32da1d85e7 100644 --- a/servers/slapd/back-bdb2/filterindex.c +++ b/servers/slapd/back-bdb2/filterindex.c @@ -345,6 +345,11 @@ substring_comp_candidates( bdb2i_idl_free( tmp ); bdb2i_idl_free( tmp2 ); } + + /* break if no candidates */ + if( idl == NULL ) { + break; + } } Debug( LDAP_DEBUG_TRACE, "<= substring_comp_candidates %ld\n", diff --git a/servers/slapd/back-ldbm/filterindex.c b/servers/slapd/back-ldbm/filterindex.c index 2c32d50d9f..65842a3463 100644 --- a/servers/slapd/back-ldbm/filterindex.c +++ b/servers/slapd/back-ldbm/filterindex.c @@ -345,6 +345,11 @@ substring_comp_candidates( idl_free( tmp ); idl_free( tmp2 ); } + + /* break if no candidates */ + if( idl == NULL ) { + break; + } } Debug( LDAP_DEBUG_TRACE, "<= substring_comp_candidates %ld\n",