Skip to content

Commit 232216d

Browse files
committed
[lldb] Use SmallString.str() to ensure NUL-termination
1 parent dbbd63f commit 232216d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2980,7 +2980,7 @@ lldb::TypeSystemSP SwiftASTContext::CreateInstance(
29802980
os << llvm::Triple::getOSTypeName(preferred_triple.getOS());
29812981
os << platform_version.getAsString();
29822982
}
2983-
computed_triple = llvm::Triple(buffer.data());
2983+
computed_triple = llvm::Triple(buffer.str());
29842984
} else if (preferred_triple.getObjectFormat() == llvm::Triple::MachO) {
29852985
LOG_PRINTF(GetLog(LLDBLog::Types),
29862986
"Completing triple based on main binary load commands.");

0 commit comments

Comments
 (0)