Re: [PATCH] nios2: force the string buffer NULL-terminated

2019-10-01 Thread Ley Foon Tan
On Mon, 2019-08-05 at 18:17 +0800, Wang Xiayang wrote: > strncpy() does not ensure NULL-termination when the input string > size equals to the destination buffer size COMMAND_LINE_SIZE. > Besides, grep under arch/ with 'boot_command_line' shows > no other arch-specific code uses strncpy() when copy

[PATCH] nios2: force the string buffer NULL-terminated

2019-08-05 Thread Wang Xiayang
strncpy() does not ensure NULL-termination when the input string size equals to the destination buffer size COMMAND_LINE_SIZE. Besides, grep under arch/ with 'boot_command_line' shows no other arch-specific code uses strncpy() when copying boot_command_line. Use strlcpy() instead. This issue is i