From: Howard Chu Date: Fri, 18 Apr 2003 04:44:06 +0000 (+0000) Subject: Fix undefined substring filters X-Git-Tag: OPENLDAP_REL_ENG_2_2_0ALPHA~323 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6b524914c553345f803675d6bab02c6b92ae2f54;p=openldap Fix undefined substring filters --- diff --git a/servers/slapd/filter.c b/servers/slapd/filter.c index a2cbc28b2e..34fa6b9f69 100644 --- a/servers/slapd/filter.c +++ b/servers/slapd/filter.c @@ -278,6 +278,7 @@ get_filter( if( err != LDAP_SUCCESS && err != SLAPD_DISCONNECT ) { /* ignore error */ + *text = NULL; f.f_choice = SLAPD_FILTER_COMPUTED; f.f_result = SLAPD_COMPARE_UNDEFINED; err = LDAP_SUCCESS; @@ -372,7 +373,13 @@ get_ssa( rc = slap_bv2ad( &desc, &ssa.sa_desc, text ); if( rc != LDAP_SUCCESS ) { - return LDAP_SUCCESS; + /* skip over the rest of this filter */ + for ( tag = ber_first_element( ber, &len, &last ); + tag != LBER_DEFAULT; + tag = ber_next_element( ber, &len, last ) ) { + ber_scanf( ber, "x" ); + } + return rc; } rc = LDAP_PROTOCOL_ERROR;