diff --git a/servers/slapd/schema_init.c b/servers/slapd/schema_init.c index 444f89c104..89aaa108ee 100644 --- a/servers/slapd/schema_init.c +++ b/servers/slapd/schema_init.c @@ -1869,6 +1869,12 @@ int caseIgnoreFilter( #if UTF8MATCH value = ber_bvstr( UTF8normalize( ((struct berval *) assertValue)->bv_val, UTF8_CASEFOLD ) ); + /* This usually happens if filter contains bad UTF8 */ + if( value == NULL ) { + keys = ch_malloc( sizeof( struct berval * ) ); + keys[0] = NULL; + return LDAP_SUCCESS; + } #else value = ber_bvdup( (struct berval *) assertValue ); ldap_pvt_str2upper( value->bv_val );