projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9024f0
)
[TIPC]: Fixed connect() to detect a dest address that is missing or too short.
author
Allan Stephens
<allan.stephens@windriver.com>
Mon, 26 Jun 2006 06:44:27 +0000
(23:44 -0700)
committer
David S. Miller
<davem@davemloft.net>
Mon, 26 Jun 2006 06:44:27 +0000
(23:44 -0700)
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>
net/tipc/socket.c
patch
|
blob
|
history
diff --git
a/net/tipc/socket.c
b/net/tipc/socket.c
index 0923213fc6a4b5cd18cb215dc854545b6f2b2a8a..758b2d2d2f9cfe3b00527a85eec5f91f3bbfc741 100644
(file)
--- 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,
if (sock->state != SS_UNCONNECTED)
return -EISCONN;
- if ((dst->family != AF_TIPC) ||
+ if ((d
estlen < sizeof(*dst)) || (d
st->family != AF_TIPC) ||
((dst->addrtype != TIPC_ADDR_NAME) && (dst->addrtype != TIPC_ADDR_ID)))
return -EINVAL;