virgl: Array cmdline on stack should initialized to 0
authorYonggang Luo <luoyonggang@gmail.com>
Wed, 1 Feb 2023 07:11:00 +0000 (15:11 +0800)
committerMarge Bot <emma+marge@anholt.net>
Tue, 6 Jun 2023 13:28:19 +0000 (13:28 +0000)
commitb3feb48548ddf9d536d58eac495d403c415ade8e
tree01c05af19758d2674a086b70ccfcb30f74a3b181
parentae7a30d5db0fd20367c111ba29cd453dd282099a
virgl: Array cmdline on stack should initialized to 0

Because strncpy may not append 0 if source string is longer than num(63)
Fixes: b3b82fe8ea1 ("virgl/vtest: add vtest driver")

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21034>
src/gallium/winsys/virgl/vtest/virgl_vtest_socket.c