ITS#7203 approxIndexer should omit zero-length keys

This commit is contained in:
Howard Chu 2012-03-09 12:47:49 -08:00
parent 47e57a9c8f
commit 8c452e3272

View File

@ -2155,7 +2155,11 @@ approxIndexer(
len = strlen( c );
if( len < SLAPD_APPROX_WORDLEN ) continue;
ber_str2bv( phonetic( c ), 0, 0, &keys[keycount] );
keycount++;
if( keys[keycount].bv_len ) {
keycount++;
} else {
ch_free( keys[keycount].bv_val );
}
i++;
}