From 820042d0132086368c4507ff6f4284ce4cd81271 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 24 May 2001 01:07:00 +0000 Subject: [PATCH] Add some additional filter checks --- servers/slapd/filter.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/servers/slapd/filter.c b/servers/slapd/filter.c index 690e62ee3e..efffa48388 100644 --- a/servers/slapd/filter.c +++ b/servers/slapd/filter.c @@ -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 ) { -- 2.39.5