Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298759
b: refs/heads/master
c: acdd598
h: refs/heads/master
i:
  298757: a46fe04
  298755: 5e2175d
  298751: fab771c
v: v3
  • Loading branch information
Thomas Graf authored and David S. Miller committed Apr 4, 2012
1 parent ccde7de commit b45a8c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 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: d96fc659aeb27686cef42d305cfd0c9702f8841c
refs/heads/master: acdd5985364f8dc511a0762fab2e683f29d9d692
5 changes: 3 additions & 2 deletions trunk/net/sctp/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -4133,9 +4133,10 @@ static int sctp_getsockopt_disable_fragments(struct sock *sk, int len,
static int sctp_getsockopt_events(struct sock *sk, int len, char __user *optval,
int __user *optlen)
{
if (len < sizeof(struct sctp_event_subscribe))
if (len <= 0)
return -EINVAL;
len = sizeof(struct sctp_event_subscribe);
if (len > sizeof(struct sctp_event_subscribe))
len = sizeof(struct sctp_event_subscribe);
if (put_user(len, optlen))
return -EFAULT;
if (copy_to_user(optval, &sctp_sk(sk)->subscribe, len))
Expand Down

0 comments on commit b45a8c6

Please sign in to comment.