arch: blackfin: kernel: setup.c: Cleaning up missing null-terminate in conjunction with strncpy

Replacing strncpy with strlcpy to avoid strings that lacks null terminate.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Steven Miao <realmz6@gmail.com>
This commit is contained in:
Rickard Strandqvist 2014-07-26 15:58:22 +02:00 committed by Steven Miao
parent 2fcc440ca6
commit 4eb147c83f

View File

@ -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);
}