We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 42504f8 commit 2c74614Copy full SHA for 2c74614
crypto/x509/x509_vfy.c
@@ -729,7 +729,7 @@ static int check_chain_extensions(X509_STORE_CTX *ctx) {
729
}
730
// Check pathlen if not self issued
731
if (i > 1 && !(x->ex_flags & EXFLAG_SI) && x->ex_pathlen != -1 &&
732
- (x->ex_pathlen > LONG_MAX - 1 || plen > x->ex_pathlen + 1)) {
+ plen - 1 > x->ex_pathlen) {
733
ctx->error = X509_V_ERR_PATH_LENGTH_EXCEEDED;
734
ctx->error_depth = i;
735
ctx->current_cert = x;
0 commit comments