diff options
author | Jakub Kicinski <kuba@kernel.org> | 2020-12-04 00:42:13 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-12-04 00:44:09 +0100 |
commit | 55fd59b003f6e8fd88cf16590e79823d7ccf3026 (patch) | |
tree | f23b2225f1a00b80632d612428708d5a57ad330b /net/x25 | |
parent | Merge branch 'mptcp-reject-invalid-mp_join-requests-right-away' (diff) | |
parent | Merge tag 'net-5.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/net... (diff) | |
download | linux-55fd59b003f6e8fd88cf16590e79823d7ccf3026.tar.xz linux-55fd59b003f6e8fd88cf16590e79823d7ccf3026.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Conflicts:
drivers/net/ethernet/ibm/ibmvnic.c
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/x25')
-rw-r--r-- | net/x25/af_x25.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 9232cdb42ad9..d41fffb2507b 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c @@ -675,7 +675,8 @@ static int x25_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) int len, i, rc = 0; if (addr_len != sizeof(struct sockaddr_x25) || - addr->sx25_family != AF_X25) { + addr->sx25_family != AF_X25 || + strnlen(addr->sx25_addr.x25_addr, X25_ADDR_LEN) == X25_ADDR_LEN) { rc = -EINVAL; goto out; } @@ -769,7 +770,8 @@ static int x25_connect(struct socket *sock, struct sockaddr *uaddr, rc = -EINVAL; if (addr_len != sizeof(struct sockaddr_x25) || - addr->sx25_family != AF_X25) + addr->sx25_family != AF_X25 || + strnlen(addr->sx25_addr.x25_addr, X25_ADDR_LEN) == X25_ADDR_LEN) goto out; rc = -ENETUNREACH; |