Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 68681
b: refs/heads/master
c: 411223c
h: refs/heads/master
i:
  68679: f821a59
v: v3
  • Loading branch information
Al Viro authored and Linus Torvalds committed Oct 14, 2007
1 parent b73816c commit 980b248
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 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: 47063d6b11fdeb166a323315a9e19f565b73d352
refs/heads/master: 411223c01a51163e995dbc2679bf8e963a136a5f
10 changes: 6 additions & 4 deletions trunk/net/sctp/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -5058,6 +5058,7 @@ static int sctp_getsockopt_active_key(struct sock *sk, int len,
static int sctp_getsockopt_peer_auth_chunks(struct sock *sk, int len,
char __user *optval, int __user *optlen)
{
struct sctp_authchunks __user *p = (void __user *)optval;
struct sctp_authchunks val;
struct sctp_association *asoc;
struct sctp_chunks_param *ch;
Expand All @@ -5066,10 +5067,10 @@ static int sctp_getsockopt_peer_auth_chunks(struct sock *sk, int len,
if (len <= sizeof(struct sctp_authchunks))
return -EINVAL;

if (copy_from_user(&val, optval, sizeof(struct sctp_authchunks)))
if (copy_from_user(&val, p, sizeof(struct sctp_authchunks)))
return -EFAULT;

to = val.gauth_chunks;
to = p->gauth_chunks;
asoc = sctp_id2assoc(sk, val.gauth_assoc_id);
if (!asoc)
return -EINVAL;
Expand All @@ -5092,6 +5093,7 @@ static int sctp_getsockopt_peer_auth_chunks(struct sock *sk, int len,
static int sctp_getsockopt_local_auth_chunks(struct sock *sk, int len,
char __user *optval, int __user *optlen)
{
struct sctp_authchunks __user *p = (void __user *)optval;
struct sctp_authchunks val;
struct sctp_association *asoc;
struct sctp_chunks_param *ch;
Expand All @@ -5100,10 +5102,10 @@ static int sctp_getsockopt_local_auth_chunks(struct sock *sk, int len,
if (len <= sizeof(struct sctp_authchunks))
return -EINVAL;

if (copy_from_user(&val, optval, sizeof(struct sctp_authchunks)))
if (copy_from_user(&val, p, sizeof(struct sctp_authchunks)))
return -EFAULT;

to = val.gauth_chunks;
to = p->gauth_chunks;
asoc = sctp_id2assoc(sk, val.gauth_assoc_id);
if (!asoc && val.gauth_assoc_id && sctp_style(sk, UDP))
return -EINVAL;
Expand Down

0 comments on commit 980b248

Please sign in to comment.