From: Howard Chu Date: Sun, 13 May 2007 09:37:37 +0000 (+0000) Subject: Don't NUL-terminate bervals during DN parsing X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~483 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5f36d3259636710c4dcdfde9dc3a0372c9e331b0;p=openldap Don't NUL-terminate bervals during DN parsing --- diff --git a/libraries/libldap/tls.c b/libraries/libldap/tls.c index c9ae5647a4..8b918c8438 100644 --- a/libraries/libldap/tls.c +++ b/libraries/libldap/tls.c @@ -3006,7 +3006,7 @@ ldap_X509dn2bv( void *x509_name, struct berval *bv, LDAPDN_rewrite_func *func, *newRDN++ = newAVA; tag = ber_skip_tag( ber, &len ); - tag = ber_get_stringbv( ber, &Oid, 0 ); + tag = ber_get_stringbv( ber, &Oid, LBER_BV_NOTERM ); if ( tag != LBER_TAG_OID ) { rc = LDAP_DECODING_ERROR; goto nomem; @@ -3056,7 +3056,7 @@ ldap_X509dn2bv( void *x509_name, struct berval *bv, LDAPDN_rewrite_func *func, newAVA->la_attr = oidname->name; } } - tag = ber_get_stringbv( ber, &Val, 0 ); + tag = ber_get_stringbv( ber, &Val, LBER_BV_NOTERM ); switch(tag) { case LBER_TAG_UNIVERSAL: /* This uses 32-bit ISO 10646-1 */