diff options
Diffstat (limited to 'net/can/bcm.c')
-rw-r--r-- | net/can/bcm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/can/bcm.c b/net/can/bcm.c index a2dee522b43e..907dc871fac8 100644 --- a/net/can/bcm.c +++ b/net/can/bcm.c | |||
@@ -1479,6 +1479,9 @@ static int bcm_connect(struct socket *sock, struct sockaddr *uaddr, int len, | |||
1479 | struct sock *sk = sock->sk; | 1479 | struct sock *sk = sock->sk; |
1480 | struct bcm_sock *bo = bcm_sk(sk); | 1480 | struct bcm_sock *bo = bcm_sk(sk); |
1481 | 1481 | ||
1482 | if (len < sizeof(*addr)) | ||
1483 | return -EINVAL; | ||
1484 | |||
1482 | if (bo->bound) | 1485 | if (bo->bound) |
1483 | return -EISCONN; | 1486 | return -EISCONN; |
1484 | 1487 | ||