From: Pierangelo Masarati Date: Wed, 16 Jan 2002 10:58:04 +0000 (+0000) Subject: fix assertion X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~111 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5c1d9b4fce591c689a8b7b693635d7e796da9875;p=openldap fix assertion --- diff --git a/libraries/libldap/getdn.c b/libraries/libldap/getdn.c index c0f0273327..91eb163b82 100644 --- a/libraries/libldap/getdn.c +++ b/libraries/libldap/getdn.c @@ -1988,9 +1988,10 @@ strval2str( struct berval *val, char *str, unsigned flags, ber_len_t *len ) /* * The length was checked in strval2strlen(); + * LDAP_UTF8_CHARLEN() should suffice */ - assert( LDAP_UTF8_CHARLEN2( &val->bv_val[ s ], cl ) > 0 ); - cl = LDAP_UTF8_CHARLEN( &val->bv_val[ s ] ); + cl = LDAP_UTF8_CHARLEN2( &val->bv_val[ s ], cl ); + assert( cl > 0 ); /* * there might be some chars we want to escape in form