From: Pierangelo Masarati Date: Mon, 12 Nov 2001 08:47:09 +0000 (+0000) Subject: fix bug in previous commit X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~882 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ea54a1a8e87c4c59b31259ee6faa90534ed16bce;p=openldap fix bug in previous commit --- diff --git a/libraries/libldap/getdn.c b/libraries/libldap/getdn.c index ecd30d4c0d..8f71949ab7 100644 --- a/libraries/libldap/getdn.c +++ b/libraries/libldap/getdn.c @@ -252,8 +252,6 @@ ldap_explode_rdn( LDAP_CONST char *rdn, int notypes ) vl = 1 + 2 * ava->la_value->bv_len; } else { - int rc; - if ( strval2strlen( ava->la_value, ava->la_flags, &vl ) ) { goto error_return; @@ -261,12 +259,13 @@ ldap_explode_rdn( LDAP_CONST char *rdn, int notypes ) } if ( !notypes ) { + al = ava->la_attr->bv_len; l = vl + ava->la_attr->bv_len + 1; str = LDAP_MALLOC( l + 1 ); AC_MEMCPY( str, ava->la_attr->bv_val, ava->la_attr->bv_len ); - str[ ava->la_attr->bv_len + 1 ] = '='; + str[ al++ ] = '='; } else { l = vl;