summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/x509/x509_vpm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/libcrypto/x509/x509_vpm.c b/src/lib/libcrypto/x509/x509_vpm.c
index 4b333e2a2d..4348ebe42f 100644
--- a/src/lib/libcrypto/x509/x509_vpm.c
+++ b/src/lib/libcrypto/x509/x509_vpm.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_vpm.c,v 1.47 2025/03/12 04:58:04 tb Exp $ */ 1/* $OpenBSD: x509_vpm.c,v 1.48 2025/03/19 16:26:20 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2004. 3 * project 2004.
4 */ 4 */
@@ -698,6 +698,10 @@ const X509_VERIFY_PARAM *
698X509_VERIFY_PARAM_get0(int id) 698X509_VERIFY_PARAM_get0(int id)
699{ 699{
700 int num = sizeof(default_table) / sizeof(X509_VERIFY_PARAM); 700 int num = sizeof(default_table) / sizeof(X509_VERIFY_PARAM);
701
702 if (id < 0)
703 return NULL;
704
701 if (id < num) 705 if (id < num)
702 return default_table + id; 706 return default_table + id;
703 return sk_X509_VERIFY_PARAM_value(param_table, id - num); 707 return sk_X509_VERIFY_PARAM_value(param_table, id - num);