Fixed segfault in caseIgnoreFilter when assertion value has bad UTF8 coding

This commit is contained in:
Stig Venaas 2001-07-15 16:21:36 +00:00
parent e864abf685
commit 886a7575d0

View File

@ -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 );