mirror of
https://github.com/torvalds/linux.git
synced 2026-11-26 16:33:17 +00:00
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]>