From: Howard Chu Date: Mon, 2 Nov 2020 13:12:10 +0000 (+0000) Subject: ITS#9383 remove assert in certificateListValidate X-Git-Tag: OPENLDAP_REL_ENG_2_4_56~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67670f4544e28fb09eb7319c39f404e1d3229e65;p=thirdparty%2Fopenldap.git ITS#9383 remove assert in certificateListValidate --- diff --git a/servers/slapd/schema_init.c b/servers/slapd/schema_init.c index ea0d67aa62..28f9e71a16 100644 --- a/servers/slapd/schema_init.c +++ b/servers/slapd/schema_init.c @@ -371,8 +371,7 @@ certificateListValidate( Syntax *syntax, struct berval *in ) /* Optional version */ if ( tag == LBER_INTEGER ) { tag = ber_get_int( ber, &version ); - assert( tag == LBER_INTEGER ); - if ( version != SLAP_X509_V2 ) return LDAP_INVALID_SYNTAX; + if ( tag != LBER_INTEGER || version != SLAP_X509_V2 ) return LDAP_INVALID_SYNTAX; } tag = ber_skip_tag( ber, &len ); /* Signature Algorithm */ if ( tag != LBER_SEQUENCE ) return LDAP_INVALID_SYNTAX;