aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/socket.c')
-rw-r--r--net/tipc/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index 0923213fc6a4..758b2d2d2f9c 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -1244,7 +1244,7 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen,
1244 if (sock->state != SS_UNCONNECTED) 1244 if (sock->state != SS_UNCONNECTED)
1245 return -EISCONN; 1245 return -EISCONN;
1246 1246
1247 if ((dst->family != AF_TIPC) || 1247 if ((destlen < sizeof(*dst)) || (dst->family != AF_TIPC) ||
1248 ((dst->addrtype != TIPC_ADDR_NAME) && (dst->addrtype != TIPC_ADDR_ID))) 1248 ((dst->addrtype != TIPC_ADDR_NAME) && (dst->addrtype != TIPC_ADDR_ID)))
1249 return -EINVAL; 1249 return -EINVAL;
1250 1250