Bug 1784724 - Initialize local variables in TlsConnectTestBase::ConnectAndCheckCipherSuite. r=bbeurdouche,nss-reviewers
authorMike Hommey <mh@glandium.org>
Mon, 15 Aug 2022 20:19:16 +0000
changeset 16280 3f038a98ad7f14bfc2eba7242bd2396052647d83
parent 16279 839161a856963477dc9b778e7b51460caa9da9ad
child 16281 3bfc72bf0ba67aa4c0f1bfe5d437511d78b22973
push id4180
push usermh@glandium.org
push dateMon, 15 Aug 2022 20:21:23 +0000
reviewersbbeurdouche, nss-reviewers
bugs1784724
Bug 1784724 - Initialize local variables in TlsConnectTestBase::ConnectAndCheckCipherSuite. r=bbeurdouche,nss-reviewers Differential Revision: https://phabricator.services.mozilla.com/D154594
gtests/ssl_gtest/ssl_ciphersuite_unittest.cc
--- a/gtests/ssl_gtest/ssl_ciphersuite_unittest.cc
+++ b/gtests/ssl_gtest/ssl_ciphersuite_unittest.cc
@@ -147,27 +147,27 @@ class TlsCipherSuiteTestBase : public Tl
     }
   }
 
   void ConnectAndCheckCipherSuite() {
     Connect();
     SendReceive();
 
     // Check that we used the right cipher suite, auth type and kea type.
-    uint16_t actual;
+    uint16_t actual = TLS_NULL_WITH_NULL_NULL;
     EXPECT_TRUE(client_->cipher_suite(&actual));
     EXPECT_EQ(cipher_suite_, actual);
     EXPECT_TRUE(server_->cipher_suite(&actual));
     EXPECT_EQ(cipher_suite_, actual);
-    SSLAuthType auth;
+    SSLAuthType auth = ssl_auth_size;
     EXPECT_TRUE(client_->auth_type(&auth));
     EXPECT_EQ(auth_type_, auth);
     EXPECT_TRUE(server_->auth_type(&auth));
     EXPECT_EQ(auth_type_, auth);
-    SSLKEAType kea;
+    SSLKEAType kea = ssl_kea_size;
     EXPECT_TRUE(client_->kea_type(&kea));
     EXPECT_EQ(kea_type_, kea);
     EXPECT_TRUE(server_->kea_type(&kea));
     EXPECT_EQ(kea_type_, kea);
   }
 
   // Get the expected limit on the number of records that can be sent for the
   // cipher suite.