Message ID | 20241115083343.2340827-11-steffen.klassert@secunet.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 9e1a6db68e3ccc5c20fd2d6243285d1cc7215fe4 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [01/11] xfrm: Add support for per cpu xfrm state handling. | expand |
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index fab18b85af53..6b0800c7c75e 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -1101,7 +1101,7 @@ static int copy_to_user_auth(struct xfrm_algo_auth *auth, struct sk_buff *skb) if (!nla) return -EMSGSIZE; algo = nla_data(nla); - strncpy(algo->alg_name, auth->alg_name, sizeof(algo->alg_name)); + strscpy_pad(algo->alg_name, auth->alg_name, sizeof(algo->alg_name)); if (redact_secret && auth->alg_key_len) memset(algo->alg_key, 0, (auth->alg_key_len + 7) / 8);