]> git.sur5r.net Git - openldap/commitdiff
Add some additional filter checks
authorKurt Zeilenga <kurt@openldap.org>
Thu, 24 May 2001 01:07:00 +0000 (01:07 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 24 May 2001 01:07:00 +0000 (01:07 +0000)
servers/slapd/filter.c

index 690e62ee3ef1751660b97c0876cc70108a57ae15..efffa483885eca36ba2f0a619270c1dd9171f2cd 100644 (file)
@@ -544,7 +544,11 @@ get_substring_filter(
 #else
                        Debug( LDAP_DEBUG_FILTER, "  INITIAL\n", 0, 0, 0 );
 #endif
-                       if ( f->f_sub_initial != NULL ) {
+
+                       if ( f->f_sub_initial != NULL
+                               || f->f_sub_any != NULL 
+                               || f->f_sub_final != NULL )
+                       {
                                ber_bvfree( value );
                                goto return_error;
                        }
@@ -568,6 +572,12 @@ get_substring_filter(
 #else
                        Debug( LDAP_DEBUG_FILTER, "  ANY\n", 0, 0, 0 );
 #endif
+
+                       if ( f->f_sub_final != NULL ) {
+                               ber_bvfree( value );
+                               goto return_error;
+                       }
+
                        if( ber_bvecadd( &f->f_sub_any, value ) < 0 ) {
                                ber_bvfree( value );
                                goto return_error;
@@ -591,10 +601,12 @@ get_substring_filter(
 #else
                        Debug( LDAP_DEBUG_FILTER, "  FINAL\n", 0, 0, 0 );
 #endif
+
                        if ( f->f_sub_final != NULL ) {
                                ber_bvfree( value );
                                goto return_error;
                        }
+
                        f->f_sub_final = value;
 
                        if( fstr ) {