From 5c1d9b4fce591c689a8b7b693635d7e796da9875 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Wed, 16 Jan 2002 10:58:04 +0000 Subject: [PATCH] fix assertion --- libraries/libldap/getdn.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 2.39.5