diff options
author | Jeremy Erickson <jerickso@cs.unc.edu> | 2014-04-18 17:06:00 -0400 |
---|---|---|
committer | Jeremy Erickson <jerickso@cs.unc.edu> | 2014-04-18 17:06:00 -0400 |
commit | a215aa7b9ab3759c047201199fba64d3042d7f13 (patch) | |
tree | bca37493d9b2233450e6d3ffced1261d0e4f71fe /net/socket.c | |
parent | d31199a77ef606f1d06894385f1852181ba6136b (diff) |
Update 2.6.36 to 2.6.36.4wip-dissipation2-jerickso
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/socket.c b/net/socket.c index 2270b941bcc7..58dfc915a3a5 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -1651,6 +1651,8 @@ SYSCALL_DEFINE6(sendto, int, fd, void __user *, buff, size_t, len, | |||
1651 | struct iovec iov; | 1651 | struct iovec iov; |
1652 | int fput_needed; | 1652 | int fput_needed; |
1653 | 1653 | ||
1654 | if (len > INT_MAX) | ||
1655 | len = INT_MAX; | ||
1654 | sock = sockfd_lookup_light(fd, &err, &fput_needed); | 1656 | sock = sockfd_lookup_light(fd, &err, &fput_needed); |
1655 | if (!sock) | 1657 | if (!sock) |
1656 | goto out; | 1658 | goto out; |
@@ -1708,6 +1710,8 @@ SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, ubuf, size_t, size, | |||
1708 | int err, err2; | 1710 | int err, err2; |
1709 | int fput_needed; | 1711 | int fput_needed; |
1710 | 1712 | ||
1713 | if (size > INT_MAX) | ||
1714 | size = INT_MAX; | ||
1711 | sock = sockfd_lookup_light(fd, &err, &fput_needed); | 1715 | sock = sockfd_lookup_light(fd, &err, &fput_needed); |
1712 | if (!sock) | 1716 | if (!sock) |
1713 | goto out; | 1717 | goto out; |