From: Jason Wang Date: Mon, 6 Sep 2021 13:46:56 +0000 (+0800) Subject: ARM: s3c: Use strscpy to replace strlcpy X-Git-Tag: v5.16-rc1~126^2~2^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aa519471715ce73034ffaa52fc85681de31c1acf;p=thirdparty%2Fkernel%2Flinux.git ARM: s3c: Use strscpy to replace strlcpy The strlcpy should not be used because it doesn't limit the source length. Preferred is strscpy. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20210906134656.101088-1-wangborong@cdjrlc.com Signed-off-by: Krzysztof Kozlowski --- diff --git a/arch/arm/mach-s3c/mach-mini6410.c b/arch/arm/mach-s3c/mach-mini6410.c index 741fa1f096945..c14c2e27127b9 100644 --- a/arch/arm/mach-s3c/mach-mini6410.c +++ b/arch/arm/mach-s3c/mach-mini6410.c @@ -262,7 +262,7 @@ static char mini6410_features_str[12] __initdata = "0"; static int __init mini6410_features_setup(char *str) { if (str) - strlcpy(mini6410_features_str, str, + strscpy(mini6410_features_str, str, sizeof(mini6410_features_str)); return 1; }