]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ARM: s3c: Use strscpy to replace strlcpy
authorXueBing Chen <chenxuebing@jari.cn>
Wed, 25 May 2022 02:32:46 +0000 (10:32 +0800)
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tue, 7 Jun 2022 12:40:24 +0000 (14:40 +0200)
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>
Link: https://lore.kernel.org/r/3e0217ca.a1d.180f90f39c7.Coremail.chenxuebing@jari.cn
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
arch/arm/mach-s3c/mach-mini2440.c

index 131015cc0c34f55475c5da2a1f4d01c5f097286d..a6d17ffcdba13afc047a645c2a6bcaf6690147f3 100644 (file)
@@ -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;
 }