From 6b524914c553345f803675d6bab02c6b92ae2f54 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 18 Apr 2003 04:44:06 +0000 Subject: [PATCH] Fix undefined substring filters --- servers/slapd/filter.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; -- 2.39.5