diff options
author | Filipe Cabecinhas <me@filcab.net> | 2012-07-30 18:56:10 +0000 |
---|---|---|
committer | Filipe Cabecinhas <me@filcab.net> | 2012-07-30 18:56:10 +0000 |
commit | cffbd09a561db29e9543874816749ead78dfb845 (patch) | |
tree | b0bfa76a7814bbb7f2635f2a29f24aa3ef823533 /lldb/source/Host | |
parent | 5c490f1b8fe21e8a67759c26ee7c668e67604e2d (diff) | |
download | bcm5719-llvm-cffbd09a561db29e9543874816749ead78dfb845.tar.gz bcm5719-llvm-cffbd09a561db29e9543874816749ead78dfb845.zip |
Make glibc and its developers happy. Circumvent the lack of strlcat in glibc.
llvm-svn: 160979
Diffstat (limited to 'lldb/source/Host')
-rw-r--r-- | lldb/source/Host/common/Host.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lldb/source/Host/common/Host.cpp b/lldb/source/Host/common/Host.cpp index 06beb11fa8c..07e966bdbb9 100644 --- a/lldb/source/Host/common/Host.cpp +++ b/lldb/source/Host/common/Host.cpp @@ -1016,7 +1016,9 @@ Host::GetLLDBPath (PathType path_type, FileSpec &file_spec) ::strncpy (framework_pos, "/Resources/Python", PATH_MAX - (framework_pos - raw_path)); } #else - ::strlcat(raw_path, "/python", sizeof(raw_path)); + // We may get our string truncated. Should we protect + // this with an assert? + ::strncat(raw_path, "/python", sizeof(raw_path) - strlen(raw_path) - 1); #endif FileSpec::Resolve (raw_path, resolved_path, sizeof(resolved_path)); g_lldb_python_dir.SetCString(resolved_path); |