mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Don't NUL-terminate bervals during DN parsing
This commit is contained in:
parent
97b0c98ab5
commit
5f36d32596
@ -3006,7 +3006,7 @@ ldap_X509dn2bv( void *x509_name, struct berval *bv, LDAPDN_rewrite_func *func,
|
|||||||
|
|
||||||
*newRDN++ = newAVA;
|
*newRDN++ = newAVA;
|
||||||
tag = ber_skip_tag( ber, &len );
|
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 ) {
|
if ( tag != LBER_TAG_OID ) {
|
||||||
rc = LDAP_DECODING_ERROR;
|
rc = LDAP_DECODING_ERROR;
|
||||||
goto nomem;
|
goto nomem;
|
||||||
@ -3056,7 +3056,7 @@ ldap_X509dn2bv( void *x509_name, struct berval *bv, LDAPDN_rewrite_func *func,
|
|||||||
newAVA->la_attr = oidname->name;
|
newAVA->la_attr = oidname->name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tag = ber_get_stringbv( ber, &Val, 0 );
|
tag = ber_get_stringbv( ber, &Val, LBER_BV_NOTERM );
|
||||||
switch(tag) {
|
switch(tag) {
|
||||||
case LBER_TAG_UNIVERSAL:
|
case LBER_TAG_UNIVERSAL:
|
||||||
/* This uses 32-bit ISO 10646-1 */
|
/* This uses 32-bit ISO 10646-1 */
|
||||||
|
Loading…
Reference in New Issue
Block a user