소스 검색

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

Haohui Mai 9 년 전
부모
커밋
6294141aeb
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/lib/common/sasl_digest_md5.cc

+ 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)));
   }