diff options
| -rw-r--r-- | net/ipv4/tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 5a15e7629d8e..7bb8479b1eaf 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
| @@ -2047,7 +2047,7 @@ static int do_tcp_setsockopt(struct sock *sk, int level, | |||
| 2047 | return -EINVAL; | 2047 | return -EINVAL; |
| 2048 | 2048 | ||
| 2049 | val = strncpy_from_user(name, optval, | 2049 | val = strncpy_from_user(name, optval, |
| 2050 | min(TCP_CA_NAME_MAX-1, optlen)); | 2050 | min_t(long, TCP_CA_NAME_MAX-1, optlen)); |
| 2051 | if (val < 0) | 2051 | if (val < 0) |
| 2052 | return -EFAULT; | 2052 | return -EFAULT; |
| 2053 | name[val] = 0; | 2053 | name[val] = 0; |
