diff options
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/socket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index afa952e726d7..9b9b2c31dd15 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -3144,7 +3144,7 @@ static int sctp_setsockopt_auth_key(struct sock *sk, | |||
3144 | goto out; | 3144 | goto out; |
3145 | } | 3145 | } |
3146 | 3146 | ||
3147 | if (authkey->sca_keylength > optlen) { | 3147 | if (authkey->sca_keylength > optlen - sizeof(struct sctp_authkey)) { |
3148 | ret = -EINVAL; | 3148 | ret = -EINVAL; |
3149 | goto out; | 3149 | goto out; |
3150 | } | 3150 | } |