From 721264db13f281914af1b13f57d420e783960f89 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 30 Sep 2008 05:05:53 +0000 Subject: [PATCH] ITS#5720 fix ldap_utf8_strchr arguments --- libraries/libldap/charray.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/libldap/charray.c b/libraries/libldap/charray.c index a02a6b94d2..b679f75d83 100644 --- a/libraries/libldap/charray.c +++ b/libraries/libldap/charray.c @@ -191,10 +191,10 @@ ldap_str2charray( const char *str_in, const char *brkstr ) } i = 1; - for ( s = str; *s; s++ ) { - if ( ldap_utf8_strchr( brkstr, s ) != NULL ) { - i++; - } + for ( s = str; *s; LDAP_UTF8_INCR(s) ) { + s = ldap_utf8_strchr( s, brkstr ); + if ( !s ) break; + i++; } res = (char **) LDAP_MALLOC( (i + 1) * sizeof(char *) ); -- 2.39.5