[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#5720) ldap_str2charray calls ldap_utf8_strchr incorrectly



quanah@OpenLDAP.org writes:
> utf-8.c:char * (ldap_utf8_strchr)( const char *str, const char *chr )
> 
> I.e., string, character, as normal libc functions.
> 
> However, at line 125 in charray.c, it is called as:
>                 if ( ldap_utf8_strchr( brkstr, s ) != NULL ) {
> This order appears to be incorrect.

No.  That code counts the number of delimiters characters in the
string being split.  Since brkstr can contain several characters,
the loop checks each "utf-8 character" in str against brkstr.

-- 
Hallvard