--- servers/slapd/filter.c 2002/01/06 05:21:30 1.71 +++ servers/slapd/filter.c 2002/03/01 17:52:45 1.73 @@ -1,5 +1,5 @@ /* filter.c - routines for parsing and dealing with filters */ -/* $OpenLDAP: pkg/ldap/servers/slapd/filter.c,v 1.70 2002/01/06 05:11:01 hyc Exp $ */ +/* $OpenLDAP: pkg/ldap/servers/slapd/filter.c,v 1.72 2002/01/14 00:43:19 hyc Exp $ */ /* * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -534,8 +534,15 @@ get_substring_filter( goto return_error; } - rc = value_normalize( f->f_sub_desc, usage, &value, &bv, text ); + /* valiate using equality matching rule validator! */ + rc = value_validate( f->f_sub_desc->ad_type->sat_equality, + &value, text ); + if( rc != LDAP_SUCCESS ) { + goto return_error; + } + rc = value_normalize( f->f_sub_desc, usage, + &value, &bv, text ); if( rc != LDAP_SUCCESS ) { goto return_error; } @@ -589,7 +596,7 @@ get_substring_filter( goto return_error; } - bvarray_add( &f->f_sub_any, &value ); + ber_bvarray_add( &f->f_sub_any, &value ); if( fstr->bv_val ) { int i = fstr->bv_len; @@ -660,7 +667,7 @@ return_error: } free( f->f_sub_initial.bv_val ); - bvarray_free( f->f_sub_any ); + ber_bvarray_free( f->f_sub_any ); free( f->f_sub_final.bv_val ); ch_free( f->f_sub ); return rc; @@ -711,7 +718,7 @@ filter_free( Filter *f ) if ( f->f_sub_initial.bv_val != NULL ) { free( f->f_sub_initial.bv_val ); } - bvarray_free( f->f_sub_any ); + ber_bvarray_free( f->f_sub_any ); if ( f->f_sub_final.bv_val != NULL ) { free( f->f_sub_final.bv_val ); }