diff options
author | des <des@FreeBSD.org> | 2017-09-02 23:39:51 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2017-09-02 23:39:51 +0000 |
commit | 7e3dcea1a1c17915cbd33fd8fcec2b5530f8d3d1 (patch) | |
tree | 0ad6b552b5cee69d3a46a71e4f906a8b18024b1d /crypto/openssh/mux.c | |
parent | ca26403304720e30901aa6f7bde4883af9662d2d (diff) | |
download | FreeBSD-src-7e3dcea1a1c17915cbd33fd8fcec2b5530f8d3d1.zip FreeBSD-src-7e3dcea1a1c17915cbd33fd8fcec2b5530f8d3d1.tar.gz |
MFH (r322052): Upgrade OpenSSH to 7.5p1.
Diffstat (limited to 'crypto/openssh/mux.c')
-rw-r--r-- | crypto/openssh/mux.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/crypto/openssh/mux.c b/crypto/openssh/mux.c index b21df15..74644a2 100644 --- a/crypto/openssh/mux.c +++ b/crypto/openssh/mux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.63 2016/10/19 23:21:56 dtucker Exp $ */ +/* $OpenBSD: mux.c,v 1.64 2017/01/21 11:32:04 guenther Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -2162,7 +2162,6 @@ int muxclient(const char *path) { struct sockaddr_un addr; - socklen_t sun_len; int sock; u_int pid; @@ -2186,8 +2185,6 @@ muxclient(const char *path) memset(&addr, '\0', sizeof(addr)); addr.sun_family = AF_UNIX; - sun_len = offsetof(struct sockaddr_un, sun_path) + - strlen(path) + 1; if (strlcpy(addr.sun_path, path, sizeof(addr.sun_path)) >= sizeof(addr.sun_path)) @@ -2197,7 +2194,7 @@ muxclient(const char *path) if ((sock = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) fatal("%s socket(): %s", __func__, strerror(errno)); - if (connect(sock, (struct sockaddr *)&addr, sun_len) == -1) { + if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) == -1) { switch (muxclient_command) { case SSHMUX_COMMAND_OPEN: case SSHMUX_COMMAND_STDIO_FWD: |