From 232216d02f07295d1244ed120f8b32691f1bc49d Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Tue, 16 Sep 2025 17:48:45 -0700 Subject: [PATCH] [lldb] Use SmallString.str() to ensure NUL-termination --- lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp b/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp index da05c0af92285..30579c74039e8 100644 --- a/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp +++ b/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp @@ -2980,7 +2980,7 @@ lldb::TypeSystemSP SwiftASTContext::CreateInstance( os << llvm::Triple::getOSTypeName(preferred_triple.getOS()); os << platform_version.getAsString(); } - computed_triple = llvm::Triple(buffer.data()); + computed_triple = llvm::Triple(buffer.str()); } else if (preferred_triple.getObjectFormat() == llvm::Triple::MachO) { LOG_PRINTF(GetLog(LLDBLog::Types), "Completing triple based on main binary load commands.");