From: Howard Chu Date: Thu, 19 Feb 2009 02:05:28 +0000 (+0000) Subject: ITS#5959 drop attrs with illegal values X-Git-Tag: ACLCHECK_0~803 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4e09f864a946ffb6530853f5d956b91a27f66a2a;p=openldap ITS#5959 drop attrs with illegal values --- diff --git a/servers/slapd/back-meta/search.c b/servers/slapd/back-meta/search.c index 27bac0e438..4c52831e23 100644 --- a/servers/slapd/back-meta/search.c +++ b/servers/slapd/back-meta/search.c @@ -2080,12 +2080,17 @@ remove_oc:; attr->a_nvals = ch_malloc( ( last + 1 ) * sizeof( struct berval ) ); for ( i = 0; ia_desc->ad_type->sat_equality->smr_normalize( + /* if normalizer fails, forget this attr */ + if ( attr->a_desc->ad_type->sat_equality->smr_normalize( SLAP_MR_VALUE_OF_ATTRIBUTE_SYNTAX, attr->a_desc->ad_type->sat_syntax, attr->a_desc->ad_type->sat_equality, &attr->a_vals[i], &attr->a_nvals[i], - NULL ); + NULL )) { + BER_BVZERO( &attr->a_nvals[i] ); + attr_free( attr ); + goto next_attr; + } } BER_BVZERO( &attr->a_nvals[i] );