projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a90140
)
Fix off-by-one error.
author
Richard Trieu
<rtrieu@google.com>
Fri, 31 May 2019 05:06:54 +0000
(
05:06
+0000)
committer
Richard Trieu
<rtrieu@google.com>
Fri, 31 May 2019 05:06:54 +0000
(
05:06
+0000)
The created string is one char too large, so it pulls the terminating NULL as
the last character of the string. This later causes SocketTest.cpp to fail.
llvm-svn: 362192
lldb/source/Host/posix/DomainSocket.cpp
patch
|
blob
|
history
diff --git
a/lldb/source/Host/posix/DomainSocket.cpp
b/lldb/source/Host/posix/DomainSocket.cpp
index f4b5f428742bb6aa6f93b6da6c99478eb1a66566..2710213efde2ff3c8f94fe3d4f97d224ead30c20 100644
(file)
--- a/
lldb/source/Host/posix/DomainSocket.cpp
+++ b/
lldb/source/Host/posix/DomainSocket.cpp
@@
-136,7
+136,7
@@
std::string DomainSocket::GetSocketName() const {
return std::string(saddr_un.sun_path + GetNameOffset(),
sock_addr_len -
offsetof(struct sockaddr_un, sun_path) -
- GetNameOffset());
+ GetNameOffset()
- 1
);
}
return "";
}