From: 陈学兵 <chenxuebing@jari.cn> To: krzk@kernel.org Cc: alim.akhtar@samsung.com, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH] ARM: s3c: Use strscpy to replace strlcpy Date: Sun, 22 May 2022 23:11:34 +0800 (GMT+08:00) [thread overview] Message-ID: <1f4faebf.9e6.180ec52dc40.Coremail.chenxuebing@jari.cn> (raw) The strlcpy should not be used because it doesn't limit the source length. Preferred is strscpy. Signed-off-by: XueBing Chen <chenxuebing@jari.cn> --- arch/arm/mach-s3c/mach-mini2440.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-s3c/mach-mini2440.c b/arch/arm/mach-s3c/mach-mini2440.c index 551ec660ab59..98cebc06521c 100644 --- a/arch/arm/mach-s3c/mach-mini2440.c +++ b/arch/arm/mach-s3c/mach-mini2440.c @@ -624,7 +624,7 @@ static char mini2440_features_str[12] __initdata = "0tb"; static int __init mini2440_features_setup(char *str) { if (str) - strlcpy(mini2440_features_str, str, + strscpy(mini2440_features_str, str, sizeof(mini2440_features_str)); return 1; } -- 2.36.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: 陈学兵 <chenxuebing@jari.cn> To: krzk@kernel.org Cc: alim.akhtar@samsung.com, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH] ARM: s3c: Use strscpy to replace strlcpy Date: Sun, 22 May 2022 23:11:34 +0800 (GMT+08:00) [thread overview] Message-ID: <1f4faebf.9e6.180ec52dc40.Coremail.chenxuebing@jari.cn> (raw) The strlcpy should not be used because it doesn't limit the source length. Preferred is strscpy. Signed-off-by: XueBing Chen <chenxuebing@jari.cn> --- arch/arm/mach-s3c/mach-mini2440.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-s3c/mach-mini2440.c b/arch/arm/mach-s3c/mach-mini2440.c index 551ec660ab59..98cebc06521c 100644 --- a/arch/arm/mach-s3c/mach-mini2440.c +++ b/arch/arm/mach-s3c/mach-mini2440.c @@ -624,7 +624,7 @@ static char mini2440_features_str[12] __initdata = "0tb"; static int __init mini2440_features_setup(char *str) { if (str) - strlcpy(mini2440_features_str, str, + strscpy(mini2440_features_str, str, sizeof(mini2440_features_str)); return 1; } -- 2.36.1
next reply other threads:[~2022-05-22 15:18 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-22 15:11 陈学兵 [this message] 2022-05-22 15:11 ` [PATCH] ARM: s3c: Use strscpy to replace strlcpy 陈学兵 2022-05-23 7:10 ` Krzysztof Kozlowski 2022-05-23 7:10 ` Krzysztof Kozlowski -- strict thread matches above, loose matches on Subject: below -- 2021-09-06 13:46 Jason Wang 2021-09-06 13:46 ` Jason Wang 2021-09-06 13:57 ` Krzysztof Kozlowski 2021-09-06 13:57 ` Krzysztof Kozlowski 2021-09-20 8:15 ` Krzysztof Kozlowski 2021-09-20 8:15 ` Krzysztof Kozlowski
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=1f4faebf.9e6.180ec52dc40.Coremail.chenxuebing@jari.cn \ --to=chenxuebing@jari.cn \ --cc=alim.akhtar@samsung.com \ --cc=krzk@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-samsung-soc@vger.kernel.org \ --cc=linux@armlinux.org.uk \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.