[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMk6uB=OJycPttFDwhP=kc7R6dB16Sg=w4xXdmXjq3u+P3fb8Q@mail.gmail.com>
Date: Tue, 29 Jul 2014 14:27:55 +0800
From: Steven Miao <realmz6@...il.com>
To: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
Cc: Sonic Zhang <sonic.zhang@...log.com>,
Al Viro <viro@...iv.linux.org.uk>,
bfin <adi-buildroot-devel@...ts.sourceforge.net>,
"open list:CAN NETWORK DRIVERS <linux-can@...r.kernel.org>, open
list:NETWORKING DRIVERS <netdev@...r.kernel.org>, open list"
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] arch: blackfin: kernel: setup.c: Cleaning up missing
null-terminate in conjunction with strncpy
Applied! Thanks.
On Sat, Jul 26, 2014 at 9:58 PM, Rickard Strandqvist
<rickard_strandqvist@...ctrumdigital.se> wrote:
> Replacing strncpy with strlcpy to avoid strings that lacks null terminate.
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
> ---
> arch/blackfin/kernel/setup.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c
> index 4f424ae..ad82468 100644
> --- a/arch/blackfin/kernel/setup.c
> +++ b/arch/blackfin/kernel/setup.c
> @@ -1464,5 +1464,5 @@ void __init cmdline_init(const char *r0)
> {
> early_shadow_stamp();
> if (r0)
> - strncpy(command_line, r0, COMMAND_LINE_SIZE);
> + strlcpy(command_line, r0, COMMAND_LINE_SIZE);
> }
> --
> 1.7.10.4
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists