Zero is a valid value for any_skip and map_skip
authorDr. Stephen Henson <steve@openssl.org>
Sun, 13 Jul 2008 22:38:18 +0000 (22:38 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Sun, 13 Jul 2008 22:38:18 +0000 (22:38 +0000)
crypto/x509v3/pcy_tree.c

index aed0155..846d3ea 100644 (file)
@@ -203,7 +203,7 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs,
                else
                        {
                        any_skip--;
-                       if ((cache->any_skip > 0)
+                       if ((cache->any_skip >= 0)
                                && (cache->any_skip < any_skip))
                                any_skip = cache->any_skip;
                        }
@@ -213,7 +213,7 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs,
                else
                        {
                        map_skip--;
-                       if ((cache->map_skip > 0)
+                       if ((cache->map_skip >= 0)
                                && (cache->map_skip < map_skip))
                                map_skip = cache->map_skip;
                        }