Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360779
b: refs/heads/master
c: 726bc6b
h: refs/heads/master
i:
  360777: b5d166c
  360775: 039814c
v: v3
  • Loading branch information
Guenter Roeck authored and David S. Miller committed Feb 27, 2013
1 parent a37e7f7 commit c8fc876
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: 45af3fb4a018ef84bf1c9f2dfbd887a41242e77f
refs/heads/master: 726bc6b092da4c093eb74d13c07184b18c1af0f1
6 changes: 3 additions & 3 deletions trunk/net/sctp/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -5653,6 +5653,9 @@ static int sctp_getsockopt_assoc_stats(struct sock *sk, int len,
if (len < sizeof(sctp_assoc_t))
return -EINVAL;

/* Allow the struct to grow and fill in as much as possible */
len = min_t(size_t, len, sizeof(sas));

if (copy_from_user(&sas, optval, len))
return -EFAULT;

Expand Down Expand Up @@ -5686,9 +5689,6 @@ static int sctp_getsockopt_assoc_stats(struct sock *sk, int len,
/* Mark beginning of a new observation period */
asoc->stats.max_obs_rto = asoc->rto_min;

/* Allow the struct to grow and fill in as much as possible */
len = min_t(size_t, len, sizeof(sas));

if (put_user(len, optlen))
return -EFAULT;

Expand Down

0 comments on commit c8fc876

Please sign in to comment.