summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/source/Core/FileSpec.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/source/Core/FileSpec.cpp b/lldb/source/Core/FileSpec.cpp
index 4fef5cd5b36..91ad6b04351 100644
--- a/lldb/source/Core/FileSpec.cpp
+++ b/lldb/source/Core/FileSpec.cpp
@@ -442,6 +442,10 @@ FileSpec::GetPath(char *path, size_t max_path_length) const
{
strncpy (path, filename, max_path_length);
}
+ else
+ {
+ return false;
+ }
// Any code paths that reach here assume that strncpy, or a similar function was called
// where any remaining bytes will be filled with NULLs and that the string won't be
OpenPOWER on IntegriCloud