summaryrefslogtreecommitdiff
path: root/net/tipc
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2024-08-29 12:33:14 -0700
committerJakub Kicinski <kuba@kernel.org>2024-08-29 12:33:15 -0700
commitd64d11b733dd435c9fce6397bcc0d235c68d1b39 (patch)
treeac6376467ea290c9e3838c1543a28e8de9b74483 /net/tipc
parent3cbd2090d334eb4456db0005f7b76adb3b6fd8db (diff)
parent82183b03de5f80f5d9c45cbb7129cd03f592f474 (diff)
Merge branch 'replace-deprecated-strcpy-with-strscpy'
Hongbo Li says: ==================== replace deprecated strcpy with strscpy The deprecated helper strcpy() performs no bounds checking on the destination buffer. This could result in linear overflows beyond the end of the buffer, leading to all kinds of misbehaviors. The safe replacement is strscpy() [1]. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy [1] ==================== Link: https://patch.msgid.link/20240828123224.3697672-1-lihongbo22@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/bearer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
index 3c9e25f6a1d2..ae1ddbf71853 100644
--- a/net/tipc/bearer.c
+++ b/net/tipc/bearer.c
@@ -326,7 +326,7 @@ static int tipc_enable_bearer(struct net *net, const char *name,
if (!b)
return -ENOMEM;
- strcpy(b->name, name);
+ strscpy(b->name, name);
b->media = m;
res = m->enable_media(net, b, attr);
if (res) {