[openssh-commits] [openssh] 01/01: don't call connect() on negative socket
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri Mar 31 14:17:52 AEDT 2023
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit a4c1c2513e36f111eeaa1322c510067930e5e51e
Author: Damien Miller <djm at mindrot.org>
Date: Fri Mar 31 14:17:22 2023 +1100
don't call connect() on negative socket
Coverity CID 405037
---
channels.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/channels.c b/channels.c
index d9f59f46..ffaf8972 100644
--- a/channels.c
+++ b/channels.c
@@ -5045,8 +5045,10 @@ connect_local_xsocket_path(const char *pathname)
struct sockaddr_un addr;
sock = socket(AF_UNIX, SOCK_STREAM, 0);
- if (sock == -1)
+ if (sock == -1) {
error("socket: %.100s", strerror(errno));
+ return -1;
+ }
memset(&addr, 0, sizeof(addr));
addr.sun_family = AF_UNIX;
strlcpy(addr.sun_path, pathname, sizeof addr.sun_path);
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list