Skip to content
Commit 91d99a72 authored by Wang Xiayang's avatar Wang Xiayang Committed by Ley Foon Tan
Browse files

nios2: force the string buffer NULL-terminated



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 identified by a Coccinelle script.

Signed-off-by: default avatarWang Xiayang <xywang.sjtu@sjtu.edu.cn>
Signed-off-by: default avatarLey Foon Tan <ley.foon.tan@intel.com>
parent 4d856f72
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment