Bläddra i källkod

HDFS-9116. Suppress false positives from Valgrind on uninitialized variables in tests. Contributed by Haohui Mai.

Haohui Mai 9 år sedan
förälder
incheckning
6294141aeb

+ 1 - 1
hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/lib/common/sasl_digest_md5.cc

@@ -93,7 +93,7 @@ size_t DigestMD5Authenticator::NextToken(const std::string &payload, size_t off,
 
 void DigestMD5Authenticator::GenerateCNonce() {
   if (!TEST_mock_cnonce_) {
-    char buf[8];
+    char buf[8] = {0,};
     RAND_pseudo_bytes(reinterpret_cast<unsigned char *>(buf), sizeof(buf));
     cnonce_ = Base64Encode(std::string(buf, sizeof(buf)));
   }