mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Swift: include null terminators into the invocation file hash
This commit is contained in:
@@ -109,7 +109,7 @@ static void checkWhetherToRunUnderTool(int argc, char* const* argv) {
|
||||
codeql::TargetFile invocationTargetFile(codeql::SwiftExtractorConfiguration& configuration) {
|
||||
auto hasher = picosha2::hash256_one_by_one();
|
||||
for (auto& option : configuration.frontendOptions) {
|
||||
hasher.process(std::begin(option), std::end(option));
|
||||
hasher.process(option.c_str(), option.c_str() + option.size() + 1);
|
||||
}
|
||||
hasher.finish();
|
||||
auto target = "invocation-"s + get_hash_hex_string(hasher);
|
||||
|
||||
Reference in New Issue
Block a user