We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e392211 + 553755a commit 44633a5Copy full SHA for 44633a5
fs/nfs/sysfs.c
@@ -280,9 +280,9 @@ void nfs_sysfs_link_rpc_client(struct nfs_server *server,
280
char name[RPC_CLIENT_NAME_SIZE];
281
int ret;
282
283
- strcpy(name, clnt->cl_program->name);
284
- strcat(name, uniq ? uniq : "");
285
- strcat(name, "_client");
+ strscpy(name, clnt->cl_program->name, sizeof(name));
+ strncat(name, uniq ? uniq : "", sizeof(name) - strlen(name) - 1);
+ strncat(name, "_client", sizeof(name) - strlen(name) - 1);
286
287
ret = sysfs_create_link_nowarn(&server->kobj,
288
&clnt->cl_sysfs->kobject, name);
0 commit comments