From: Pierangelo Masarati Date: Sun, 24 Jan 2010 19:16:57 +0000 (+0000) Subject: skip the serial, whatever its length (ITS#6460) X-Git-Tag: MIGRATION_CVS2GIT~708 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=797387c4ef3358fb314c2e470a008c1c977c3ba0;p=openldap skip the serial, whatever its length (ITS#6460) --- diff --git a/libraries/libldap/tls.c b/libraries/libldap/tls.c index 6c3940f68a..6fab67eb92 100644 --- a/libraries/libldap/tls.c +++ b/libraries/libldap/tls.c @@ -1677,7 +1677,8 @@ x509_cert_get_dn( struct berval *cert, struct berval *dn, int get_subject ) tag = ber_skip_tag( ber, &len ); /* Context + Constructed (version) */ if ( tag == 0xa0 ) /* Version is optional */ tag = ber_get_int( ber, &i ); /* Int: Version */ - tag = ber_get_int( ber, &i ); /* Int: Serial */ + tag = ber_skip_tag( ber, &len ); /* Int: Serial (can be longer than ber_int_t) */ + ber_skip_data( ber, len ); tag = ber_skip_tag( ber, &len ); /* Sequence: Signature */ ber_skip_data( ber, len ); if ( !get_subject ) {