]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9383 remove assert in certificateListValidate
authorHoward Chu <hyc@openldap.org>
Mon, 2 Nov 2020 13:12:10 +0000 (13:12 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Mon, 2 Nov 2020 16:07:28 +0000 (16:07 +0000)
servers/slapd/schema_init.c

index ea0d67aa628b949eb21974c92b822c50b8ddfd8a..28f9e71a16045c62720066c7b6224c4e6e541413 100644 (file)
@@ -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;