diff options
author | Eric Engestrom <[email protected]> | 2018-08-16 15:46:31 +0100 |
---|---|---|
committer | Eric Engestrom <[email protected]> | 2018-08-16 17:38:31 +0100 |
commit | 6cf0d4f91f97728472af9edce68d75f3aa757519 (patch) | |
tree | a5957fabbaed9190a51cf59d63412bf43f062200 | |
parent | d6aea403267a96d9f840e308755e3c58315a70de (diff) |
anv: use safer snprintf() to ensure NULL string-terminator
Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
-rw-r--r-- | src/intel/vulkan/anv_device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index c40b94d69f3..897249baa6a 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -325,7 +325,7 @@ anv_physical_device_init(struct anv_physical_device *device, device->instance = instance; assert(strlen(path) < ARRAY_SIZE(device->path)); - strncpy(device->path, path, ARRAY_SIZE(device->path)); + snprintf(device->path, ARRAY_SIZE(device->path), "%s", path); device->no_hw = getenv("INTEL_NO_HW") != NULL; |