summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2025-03-19 16:35:11 +0000
committertb <>2025-03-19 16:35:11 +0000
commit168699d3fe8ffdabb6765e02f3e9f53a65823660 (patch)
tree572c0dad5a0cd2cdd8bcb65a8fa415baf2913bdb
parent091154b236c574af68b6ded19f47a095c90df85f (diff)
downloadopenbsd-168699d3fe8ffdabb6765e02f3e9f53a65823660.tar.gz
openbsd-168699d3fe8ffdabb6765e02f3e9f53a65823660.tar.bz2
openbsd-168699d3fe8ffdabb6765e02f3e9f53a65823660.zip
X509_VERIFY_PARAM_lookup(): avoid passing stack garbage around
ok jsing
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/x509/x509_vpm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libcrypto/x509/x509_vpm.c b/src/lib/libcrypto/x509/x509_vpm.c
index dfcd8d3d3c..24ea72b4fe 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.53 2025/03/19 16:33:59 tb Exp $ */ 1/* $OpenBSD: x509_vpm.c,v 1.54 2025/03/19 16:35:11 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 */
@@ -720,6 +720,7 @@ X509_VERIFY_PARAM_lookup(const char *name)
720 size_t i; 720 size_t i;
721 int idx; 721 int idx;
722 722
723 memset(&param, 0, sizeof(param));
723 param.name = (char *)name; 724 param.name = (char *)name;
724 if ((idx = sk_X509_VERIFY_PARAM_find(param_table, &param)) != -1) 725 if ((idx = sk_X509_VERIFY_PARAM_find(param_table, &param)) != -1)
725 return sk_X509_VERIFY_PARAM_value(param_table, idx); 726 return sk_X509_VERIFY_PARAM_value(param_table, idx);