diff options
Diffstat (limited to 'contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp')
-rw-r--r-- | contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp b/contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp index 674ec9b6140a..5f6429f5cd0e 100644 --- a/contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp +++ b/contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp @@ -67,7 +67,7 @@ simple_readline(FILE *stdin, FILE *stdout, char *prompt) char *ret = (char *)PyMem_Malloc(n + 2); #endif if (ret) { - strncpy(ret, line, n); + memcpy(ret, line, n); free(line); ret[n] = '\n'; ret[n + 1] = '\0'; |