Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Signed-off-by: Ley Foon Tan <[email protected]>
- Loading branch information