From 6294141aeb3a2c4f0ae79e3b97d3a28bf1311f79 Mon Sep 17 00:00:00 2001 From: Haohui Mai Date: Mon, 21 Sep 2015 11:34:50 -0700 Subject: [PATCH] HDFS-9116. Suppress false positives from Valgrind on uninitialized variables in tests. Contributed by Haohui Mai. --- .../src/main/native/libhdfspp/lib/common/sasl_digest_md5.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/lib/common/sasl_digest_md5.cc b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/lib/common/sasl_digest_md5.cc index 6f53e28a1f..3ca85786d1 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/lib/common/sasl_digest_md5.cc +++ b/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(buf), sizeof(buf)); cnonce_ = Base64Encode(std::string(buf, sizeof(buf))); }