anv: use snprintf() instead of memset()+strcpy()
authorEric Engestrom <eric.engestrom@intel.com>
Tue, 23 Oct 2018 14:27:51 +0000 (15:27 +0100)
committerEric Engestrom <eric.engestrom@intel.com>
Wed, 24 Oct 2018 17:15:56 +0000 (18:15 +0100)
commited5d65a6a1a01f2b6227d461bcfb02642a1bb608
tree83cf449d9937a9a7f95cc23c989642e54b286ff0
parent33d757096dafd5e66f92e2a36e6855de6e8724d2
anv: use snprintf() instead of memset()+strcpy()

snprintf() guarantees that it will not write more chars than allowed,
and that the string will be null-terminated, without the need to fill
the whole thing with zeroes to begin with.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/anv_device.c