From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-kernel@vger.kernel.org
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
linux-fsdevel@vger.kernel.org
Subject: [PATCH 03/14] proc: move from strlcpy with unused retval to strscpy
Date: Thu, 18 Aug 2022 23:01:12 +0200 [thread overview]
Message-ID: <20220818210123.7637-3-wsa+renesas@sang-engineering.com> (raw)
In-Reply-To: <20220818210123.7637-1-wsa+renesas@sang-engineering.com>
Follow the advice of the below link and prefer 'strscpy' in this
subsystem. Conversion is 1:1 because the return value is not used.
Generated by a coccinelle script.
Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
fs/proc/kcore.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
index dff921f7ca33..9f61d5d405f5 100644
--- a/fs/proc/kcore.c
+++ b/fs/proc/kcore.c
@@ -422,7 +422,7 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos)
char *notes;
size_t i = 0;
- strlcpy(prpsinfo.pr_psargs, saved_command_line,
+ strscpy(prpsinfo.pr_psargs, saved_command_line,
sizeof(prpsinfo.pr_psargs));
notes = kzalloc(notes_len, GFP_KERNEL);
--
2.35.1
next prev parent reply other threads:[~2022-08-18 21:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-18 21:01 [PATCH 01/14] vboxsf: move from strlcpy with unused retval to strscpy Wolfram Sang
2022-08-18 21:01 ` Wolfram Sang [this message]
2022-08-18 21:01 ` [PATCH 13/14] affs: " Wolfram Sang
2022-08-18 21:01 ` [PATCH 14/14] fs: " Wolfram Sang
2022-08-19 9:01 ` [PATCH 01/14] vboxsf: " Hans de Goede
2022-08-20 8:18 ` Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220818210123.7637-3-wsa+renesas@sang-engineering.com \
--to=wsa+renesas@sang-engineering.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).