Bug 1381198 - initialize variable, a=bustage NSS_TLS13_DRAFT19_BRANCH
authorMartin Thomson <martin.thomson@gmail.com>
Sat, 15 Jul 2017 11:18:18 +0200
branchNSS_TLS13_DRAFT19_BRANCH
changeset 13462 e1c050652e1685007a240c9c8c2c5c55d1f8ef2b
parent 13461 57c9c3838e79394c3f297ebe0a51c30430cf0e48
child 13463 7abf299e1e6fc9ec0303ea7291b0160d2917059b
push id2271
push usermartin.thomson@gmail.com
push dateSat, 15 Jul 2017 09:18:31 +0000
reviewersbustage
bugs1381198
Bug 1381198 - initialize variable, a=bustage
gtests/ssl_gtest/ssl_fuzz_unittest.cc
--- a/gtests/ssl_gtest/ssl_fuzz_unittest.cc
+++ b/gtests/ssl_gtest/ssl_fuzz_unittest.cc
@@ -275,17 +275,17 @@ FUZZ_P(TlsConnectGeneric, UnencryptedSes
       kTlsHandshakeNewSessionTicket);
   server_->SetPacketFilter(i1);
   Connect();
 
   std::cerr << "ticket" << i1->buffer() << std::endl;
   size_t offset = 4; /* lifetime */
   if (version_ == SSL_LIBRARY_VERSION_TLS_1_3) {
     offset += 4;  /* ticket_age_add */
-    uint32_t nonce_len;
+    uint32_t nonce_len = 0;
     EXPECT_TRUE(i1->buffer().Read(offset, 1, &nonce_len));
     offset += 1 + nonce_len;
   }
   offset += 2 + /* ticket length */
             2;  /* TLS_EX_SESS_TICKET_VERSION */
   // Check the protocol version number.
   uint32_t tls_version = 0;
   EXPECT_TRUE(i1->buffer().Read(offset, sizeof(version_), &tls_version));