From f92d01c2bbf038dac5ed49d0905730b35f215cc9 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 16 Jul 1999 22:26:57 +0000 Subject: [PATCH] fix substring_comp_candidates logic if intersection of candidates is ever empty. See ITS#228. --- servers/slapd/back-bdb2/filterindex.c | 5 +++++ servers/slapd/back-ldbm/filterindex.c | 5 +++++ 2 files changed, 10 insertions(+) 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", -- 2.39.5