From ea54a1a8e87c4c59b31259ee6faa90534ed16bce Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Mon, 12 Nov 2001 08:47:09 +0000 Subject: [PATCH] fix bug in previous commit --- libraries/libldap/getdn.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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; -- 2.39.5