aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/socket.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/socket.c b/net/socket.c
index abf3e2561521..2808b4db46ee 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -1652,6 +1652,8 @@ SYSCALL_DEFINE6(sendto, int, fd, void __user *, buff, size_t, len,
1652 struct iovec iov; 1652 struct iovec iov;
1653 int fput_needed; 1653 int fput_needed;
1654 1654
1655 if (len > INT_MAX)
1656 len = INT_MAX;
1655 sock = sockfd_lookup_light(fd, &err, &fput_needed); 1657 sock = sockfd_lookup_light(fd, &err, &fput_needed);
1656 if (!sock) 1658 if (!sock)
1657 goto out; 1659 goto out;
@@ -1709,6 +1711,8 @@ SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, ubuf, size_t, size,
1709 int err, err2; 1711 int err, err2;
1710 int fput_needed; 1712 int fput_needed;
1711 1713
1714 if (size > INT_MAX)
1715 size = INT_MAX;
1712 sock = sockfd_lookup_light(fd, &err, &fput_needed); 1716 sock = sockfd_lookup_light(fd, &err, &fput_needed);
1713 if (!sock) 1717 if (!sock)
1714 goto out; 1718 goto out;