--- servers/slapd/filter.c 2000/02/07 16:50:42 1.22 +++ servers/slapd/filter.c 2000/02/14 19:57:40 1.23 @@ -1,5 +1,5 @@ /* filter.c - routines for parsing and dealing with filters */ -/* $OpenLDAP: pkg/ldap/servers/slapd/filter.c,v 1.21 2000/02/06 20:09:45 kurt Exp $ */ +/* $OpenLDAP: pkg/ldap/servers/slapd/filter.c,v 1.22 2000/02/07 16:50:42 kurt Exp $ */ /* * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -290,10 +290,9 @@ get_substring_filter( #else /* we should call a substring syntax normalization routine */ value_normalize( val->bv_val, syntax ); -#endif - /* this is bogus, value_normalize should take a berval */ val->bv_len = strlen( val->bv_val ); +#endif switch ( tag ) { case LDAP_SUBSTRING_INITIAL: @@ -313,7 +312,10 @@ get_substring_filter( case LDAP_SUBSTRING_ANY: Debug( LDAP_DEBUG_FILTER, " ANY\n", 0, 0, 0 ); - charray_add( (char ***) &f->f_sub_any, (char *) val ); + if( ber_bvecadd( &f->f_sub_any, val ) < 0 ) { + ber_bvfree( val ); + goto return_error; + } if( fstr ) { *fstr = ch_realloc( *fstr,