mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
FASTBuild: fix possible collision in exec's name
I was lucky enough to hit a hash collision in the first 7 hex digits (28 bits) of SHA256 :)
This commit is contained in:
@@ -155,7 +155,7 @@ std::string cmFastbuildTargetGenerator::GetCustomCommandTargetName(
|
||||
extras += std::to_string(static_cast<int>(step));
|
||||
|
||||
cmCryptoHash hash(cmCryptoHash::AlgoSHA256);
|
||||
targetName += "-" + hash.HashString(extras).substr(0, 7);
|
||||
targetName += "-" + hash.HashString(extras).substr(0, 14);
|
||||
|
||||
return targetName;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user