mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-15 16:53:54 +08:00
[TIPC]: Fixed connect() to detect a dest address that is missing or too short.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Per Liden <per.liden@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e9024f0f79
commit
6b384de853
@ -1244,7 +1244,7 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen,
|
||||
if (sock->state != SS_UNCONNECTED)
|
||||
return -EISCONN;
|
||||
|
||||
if ((dst->family != AF_TIPC) ||
|
||||
if ((destlen < sizeof(*dst)) || (dst->family != AF_TIPC) ||
|
||||
((dst->addrtype != TIPC_ADDR_NAME) && (dst->addrtype != TIPC_ADDR_ID)))
|
||||
return -EINVAL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user