summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Cantrill <bryan@joyent.com>2015-07-23 05:50:38 +0000
committerBryan Cantrill <bryan@joyent.com>2015-07-23 05:50:38 +0000
commitd5fade6d5940dc5e71dcd7d283382912f601eccd (patch)
treec01b16a216492134f58faf5b3e8f46294b050b55
parent571323b8e15a617ad5ab28f90895847c05f58f67 (diff)
downloadillumos-joyent-d5fade6d5940dc5e71dcd7d283382912f601eccd.tar.gz
OS-4533 lx brand: lx_connect() needs to initialize len
-rw-r--r--usr/src/uts/common/brand/lx/syscall/lx_socket.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr/src/uts/common/brand/lx/syscall/lx_socket.c b/usr/src/uts/common/brand/lx/syscall/lx_socket.c
index d91c9cdad9..15a7bebbda 100644
--- a/usr/src/uts/common/brand/lx/syscall/lx_socket.c
+++ b/usr/src/uts/common/brand/lx/syscall/lx_socket.c
@@ -317,7 +317,7 @@ ltos_sockaddr_ux(const struct sockaddr *inaddr, const socklen_t inlen,
VERIFY(len > 0);
VERIFY(len <= sizeof (buf.sun_path));
- bzero(&buf, sizeof(buf));
+ bzero(&buf, sizeof (buf));
if (inaddr->sa_data[0] == '\0') {
/*
@@ -1154,7 +1154,7 @@ lx_connect(long sock, uintptr_t name, socklen_t namelen)
struct sonode *so;
struct sockaddr *addr = NULL;
lx_socket_aux_data_t *sad = NULL;
- socklen_t len;
+ socklen_t len = 0;
file_t *fp;
int error;
@@ -1176,7 +1176,6 @@ lx_connect(long sock, uintptr_t name, socklen_t namelen)
}
}
-
error = socket_connect(so, addr, len, fp->f_flag,
_SOCONNECT_XPG4_2, CRED());