projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d139ff0
)
net: Truncate recvfrom and sendto length to INT_MAX.
author
Linus Torvalds
<torvalds@linux-foundation.org>
Sat, 30 Oct 2010 23:43:10 +0000
(16:43 -0700)
committer
David S. Miller
<davem@davemloft.net>
Sat, 30 Oct 2010 23:44:07 +0000
(16:44 -0700)
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/socket.c
patch
|
blob
|
history
diff --git
a/net/socket.c
b/net/socket.c
index abf3e2561521acc1ce82167b9edaf71eaf263ee9..2808b4db46ee592b44afb2e47f835bf77ce699d5 100644
(file)
--- a/
net/socket.c
+++ b/
net/socket.c
@@
-1652,6
+1652,8
@@
SYSCALL_DEFINE6(sendto, int, fd, void __user *, buff, size_t, len,
struct iovec iov;
int fput_needed;
+ if (len > INT_MAX)
+ len = INT_MAX;
sock = sockfd_lookup_light(fd, &err, &fput_needed);
if (!sock)
goto out;
@@
-1709,6
+1711,8
@@
SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, ubuf, size_t, size,
int err, err2;
int fput_needed;
+ if (size > INT_MAX)
+ size = INT_MAX;
sock = sockfd_lookup_light(fd, &err, &fput_needed);
if (!sock)
goto out;