diff --git a/Source/cmCryptoHash.cxx b/Source/cmCryptoHash.cxx index 0d3c6bbcb..74e17b622 100644 --- a/Source/cmCryptoHash.cxx +++ b/Source/cmCryptoHash.cxx @@ -38,7 +38,7 @@ cmsys::auto_ptr cmCryptoHash::New(const char* algo) std::string cmCryptoHash::HashString(const std::string& input) { this->Initialize(); - this->Append(reinterpret_cast(&input[0]), + this->Append(reinterpret_cast(input.c_str()), static_cast(input.size())); return this->Finalize(); }