virtio_console: Use strscpy() to instead of strncpy()
authorBo Liu <liubo03@inspur.com>
Wed, 18 Jan 2023 01:29:44 +0000 (20:29 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Jan 2023 12:07:54 +0000 (13:07 +0100)
commitc7109c72ab92dd6934b9ff8d45cb7e86f7a7ba0d
treed75ceb21f352d75f4e651cdcf380b5b8fdf0d1e9
parentc6e29fe5e08ce177b8a1a77aa99c59da2f166044
virtio_console: Use strscpy() to instead of strncpy()

The implementation of strscpy() is more robust and safer.
That's now the recommended way to copy NUL-terminated strings.

Signed-off-by: Bo Liu <liubo03@inspur.com>
Link: https://lore.kernel.org/r/20230118012944.2436-1-liubo03@inspur.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/virtio_console.c