[Lldb-commits] [lldb] r156264 - in /lldb/trunk/source/Host/macosx: Host.mm Symbols.cpp

Filipe Cabecinhas me at filcab.net
Sun May 6 10:56:42 PDT 2012


Author: filcab
Date: Sun May  6 12:56:42 2012
New Revision: 156264

URL: http://llvm.org/viewvc/llvm-project?rev=156264&view=rev
Log:
Fixed some strncat/strlcat uses.

Modified:
    lldb/trunk/source/Host/macosx/Host.mm
    lldb/trunk/source/Host/macosx/Symbols.cpp

Modified: lldb/trunk/source/Host/macosx/Host.mm
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Host.mm?rev=156264&r1=156263&r2=156264&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/Host.mm (original)
+++ lldb/trunk/source/Host/macosx/Host.mm Sun May  6 12:56:42 2012
@@ -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, 

Modified: lldb/trunk/source/Host/macosx/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Symbols.cpp?rev=156264&r1=156263&r2=156264&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/Symbols.cpp (original)
+++ lldb/trunk/source/Host/macosx/Symbols.cpp Sun May  6 12:56:42 2012
@@ -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;





More information about the lldb-commits mailing list