diff options
author | Wang Xiayang <xywang.sjtu@sjtu.edu.cn> | 2019-09-20 08:55:47 +0200 |
---|---|---|
committer | Ley Foon Tan <ley.foon.tan@intel.com> | 2019-09-20 08:55:57 +0200 |
commit | 91d99a724e9c60e14332c26ab2284bf696b94c8e (patch) | |
tree | b1063a99689b528be795a82943bbdf97ab69869a /drivers/mailbox | |
parent | Linux 5.3 (diff) | |
download | linux-91d99a724e9c60e14332c26ab2284bf696b94c8e.tar.xz linux-91d99a724e9c60e14332c26ab2284bf696b94c8e.zip |
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: Wang Xiayang <xywang.sjtu@sjtu.edu.cn>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
Diffstat (limited to 'drivers/mailbox')
0 files changed, 0 insertions, 0 deletions