summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbeck <>2024-03-28 01:45:18 +0000
committerbeck <>2024-03-28 01:45:18 +0000
commit852ce4f4fa6a26ebd4801907061f85fb0c1f4e99 (patch)
treeb433119eb76ed4c7dce8c2cf582fe90c5eeda9af /src
parentf00df7e0320e9afb5a3162efa32063f0b168aea3 (diff)
downloadopenbsd-852ce4f4fa6a26ebd4801907061f85fb0c1f4e99.tar.gz
openbsd-852ce4f4fa6a26ebd4801907061f85fb0c1f4e99.tar.bz2
openbsd-852ce4f4fa6a26ebd4801907061f85fb0c1f4e99.zip
Fix coverity complaints.
Diffstat (limited to 'src')
-rw-r--r--src/regress/lib/libssl/tlsext/tlsexttest.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/regress/lib/libssl/tlsext/tlsexttest.c b/src/regress/lib/libssl/tlsext/tlsexttest.c
index eced498572..832063dd0a 100644
--- a/src/regress/lib/libssl/tlsext/tlsexttest.c
+++ b/src/regress/lib/libssl/tlsext/tlsexttest.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tlsexttest.c,v 1.88 2024/03/27 23:56:34 beck Exp $ */ 1/* $OpenBSD: tlsexttest.c,v 1.89 2024/03/28 01:45:18 beck Exp $ */
2/* 2/*
3 * Copyright (c) 2017 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2017 Joel Sing <jsing@openbsd.org>
4 * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> 4 * Copyright (c) 2017 Doug Hogan <doug@openbsd.org>
@@ -3706,11 +3706,14 @@ test_tlsext_keyshare_client(void)
3706 /* Fake up the ssl enough so the key share can process */ 3706 /* Fake up the ssl enough so the key share can process */
3707 tls_key_share_free(ssl->s3->hs.key_share); 3707 tls_key_share_free(ssl->s3->hs.key_share);
3708 ssl->session = SSL_SESSION_new(); 3708 ssl->session = SSL_SESSION_new();
3709 if (ssl->session == NULL) {
3710 FAIL("malloc");
3711 goto done;
3712 }
3709 memset(ssl->s3, 0, sizeof(*ssl->s3)); 3713 memset(ssl->s3, 0, sizeof(*ssl->s3));
3710 ssl->session->tlsext_supportedgroups = calloc(4, 3714 ssl->session->tlsext_supportedgroups = calloc(4,
3711 sizeof(unsigned short)); 3715 sizeof(unsigned short));
3712 if (ssl->session == NULL || 3716 if (ssl->session->tlsext_supportedgroups == NULL) {
3713 ssl->session->tlsext_supportedgroups == NULL) {
3714 FAIL("malloc"); 3717 FAIL("malloc");
3715 goto done; 3718 goto done;
3716 } 3719 }
@@ -3780,7 +3783,6 @@ test_tlsext_keyshare_client(void)
3780 FAIL("Processed key share with invalid group!"); 3783 FAIL("Processed key share with invalid group!");
3781 goto done; 3784 goto done;
3782 } 3785 }
3783 ssl->session->tlsext_supportedgroups[0] = 29;
3784 3786
3785 /* 3787 /*
3786 * Make 29 least preferred, while server supports both 29 and 25. 3788 * Make 29 least preferred, while server supports both 29 and 25.