diff options
-rw-r--r-- | net/tipc/socket.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 6dd5bd95236a..094710519477 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c | |||
@@ -1851,6 +1851,8 @@ static int tipc_connect(struct socket *sock, struct sockaddr *dest, | |||
1851 | if (dst->family == AF_UNSPEC) { | 1851 | if (dst->family == AF_UNSPEC) { |
1852 | memset(&tsk->remote, 0, sizeof(struct sockaddr_tipc)); | 1852 | memset(&tsk->remote, 0, sizeof(struct sockaddr_tipc)); |
1853 | tsk->connected = 0; | 1853 | tsk->connected = 0; |
1854 | } else if (destlen != sizeof(struct sockaddr_tipc)) { | ||
1855 | res = -EINVAL; | ||
1854 | } else { | 1856 | } else { |
1855 | memcpy(&tsk->remote, dest, destlen); | 1857 | memcpy(&tsk->remote, dest, destlen); |
1856 | tsk->connected = 1; | 1858 | tsk->connected = 1; |