summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/tools/lldb-server/lldb-gdbserver.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/tools/lldb-server/lldb-gdbserver.cpp b/lldb/tools/lldb-server/lldb-gdbserver.cpp
index 18938ce7e3b..df8cb6e6855 100644
--- a/lldb/tools/lldb-server/lldb-gdbserver.cpp
+++ b/lldb/tools/lldb-server/lldb-gdbserver.cpp
@@ -257,7 +257,7 @@ writeSocketIdToPipe(Pipe &port_pipe, const std::string &socket_id)
{
size_t bytes_written = 0;
// Write the port number as a C string with the NULL terminator.
- return port_pipe.Write(socket_id.c_str(), socket_id.size(), bytes_written);
+ return port_pipe.Write(socket_id.c_str(), socket_id.size() + 1, bytes_written);
}
Error
OpenPOWER on IntegriCloud