diff options
-rw-r--r-- | crypto/x509/pcy_tree.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/x509/pcy_tree.c b/crypto/x509/pcy_tree.c index d7307b12da..86e3afc881 100644 --- a/crypto/x509/pcy_tree.c +++ b/crypto/x509/pcy_tree.c @@ -110,6 +110,8 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs, *ptree = NULL; + if (n < 0) + return X509_PCY_TREE_INTERNAL; /* Can't do anything with just a trust anchor */ if (n == 0) return X509_PCY_TREE_EMPTY; |