From: Howard Chu Date: Fri, 9 Mar 2012 20:47:49 +0000 (-0800) Subject: ITS#7203 approxIndexer should omit zero-length keys X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8c452e32725801628739ee89d88ae5083e156314;p=openldap ITS#7203 approxIndexer should omit zero-length keys --- diff --git a/servers/slapd/schema_init.c b/servers/slapd/schema_init.c index dbf93df35c..080bd6a7ad 100644 --- a/servers/slapd/schema_init.c +++ b/servers/slapd/schema_init.c @@ -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++; }