From: Stig Venaas Date: Sun, 15 Jul 2001 16:21:36 +0000 (+0000) Subject: Fixed segfault in caseIgnoreFilter when assertion value has bad UTF8 coding X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1234 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=886a7575d0dc037d238f31b0cb26fab5b6c8404c;p=openldap Fixed segfault in caseIgnoreFilter when assertion value has bad UTF8 coding --- 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 );