Fixed some strncat/strlcat uses.
llvm-svn: 156264
diff --git a/lldb/source/Host/macosx/Host.mm b/lldb/source/Host/macosx/Host.mm
index eeaa84f..74ddb1a 100644
--- a/lldb/source/Host/macosx/Host.mm
+++ b/lldb/source/Host/macosx/Host.mm
@@ -325,7 +325,7 @@
unix_socket_name.assign (temp_file_path);
- ::strncat (temp_file_path, ".command", sizeof (temp_file_path));
+ ::strlcat (temp_file_path, ".command", sizeof (temp_file_path));
StreamFile command_file;
command_file.GetFile().Open (temp_file_path,
diff --git a/lldb/source/Host/macosx/Symbols.cpp b/lldb/source/Host/macosx/Symbols.cpp
index 1509b71..bc93771 100644
--- a/lldb/source/Host/macosx/Symbols.cpp
+++ b/lldb/source/Host/macosx/Symbols.cpp
@@ -483,8 +483,8 @@
if (strcasestr(path, ".dSYM/Contents/Resources/DWARF") == NULL)
{
size_t obj_file_path_length = strlen(path);
- strncat(path, ".dSYM/Contents/Resources/DWARF/", sizeof(path));
- strncat(path, exec_fspec->GetFilename().AsCString(), sizeof(path));
+ strlcat(path, ".dSYM/Contents/Resources/DWARF/", sizeof(path));
+ strlcat(path, exec_fspec->GetFilename().AsCString(), sizeof(path));
dsym_fspec.SetFile(path, false);
@@ -503,8 +503,8 @@
if (next_slash != NULL)
{
*next_slash = '\0';
- strncat(path, ".dSYM/Contents/Resources/DWARF/", sizeof(path));
- strncat(path, exec_fspec->GetFilename().AsCString(), sizeof(path));
+ strlcat(path, ".dSYM/Contents/Resources/DWARF/", sizeof(path));
+ strlcat(path, exec_fspec->GetFilename().AsCString(), sizeof(path));
dsym_fspec.SetFile(path, false);
if (dsym_fspec.Exists() && FileAtPathContainsArchAndUUID (dsym_fspec, module_spec.GetArchitecturePtr(), module_spec.GetUUIDPtr()))
return true;