Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166564
b: refs/heads/master
c: 4737905
h: refs/heads/master
v: v3
  • Loading branch information
Arjan van de Ven authored and David S. Miller committed Sep 28, 2009
1 parent 28d4fef commit c7595fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 30df94f800368a016d09ee672c9fcc20751d0260
refs/heads/master: 47379052b5c87707bc6e20a2a4f6ac156fb8357c
7 changes: 6 additions & 1 deletion trunk/net/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -2098,12 +2098,17 @@ SYSCALL_DEFINE2(socketcall, int, call, unsigned long __user *, args)
unsigned long a[6];
unsigned long a0, a1;
int err;
unsigned int len;

if (call < 1 || call > SYS_ACCEPT4)
return -EINVAL;

len = nargs[call];
if (len > sizeof(a))
return -EINVAL;

/* copy_from_user should be SMP safe. */
if (copy_from_user(a, args, nargs[call]))
if (copy_from_user(a, args, len))
return -EFAULT;

audit_socketcall(nargs[call] / sizeof(unsigned long), a);
Expand Down

0 comments on commit c7595fe

Please sign in to comment.