Fix a stack buffer overflow found by ASAN.
authorAdrian Prantl <aprantl@apple.com>
Mon, 8 Apr 2019 21:58:36 +0000 (21:58 +0000)
committerAdrian Prantl <aprantl@apple.com>
Mon, 8 Apr 2019 21:58:36 +0000 (21:58 +0000)
commit1a0c0ffa9db515b9129b1086cdcf308ff342a519
treed526f3b8b0cd981d1314080118257061bcc53343
parent941f247d30c447903107aa614ea46fb1e4019698
Fix a stack buffer overflow found by ASAN.

llvm::StringRef host_and_port is not guaranteed to be null-terminated.
Generally, it is not safe at all to convert a StringRef into a char *
by calling data() on it.

<rdar://problem/49698580>

llvm-svn: 357948
lldb/source/Host/common/Socket.cpp