diff --git a/dbms/src/Interpreters/Cluster.cpp b/dbms/src/Interpreters/Cluster.cpp index 6fdfaf90ceb..bf30b1ca98f 100644 --- a/dbms/src/Interpreters/Cluster.cpp +++ b/dbms/src/Interpreters/Cluster.cpp @@ -374,7 +374,7 @@ void Cluster::assignName() SHA512_Init(&ctx); for (const auto & host : elements) - SHA512_Update(&ctx, reinterpret_cast(host.data()), host.size()); + SHA512_Update(&ctx, reinterpret_cast(host.c_str()), host.size() + 1); SHA512_Final(hash, &ctx);