mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
anv: use safer snprintf() to ensure NULL string-terminator
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
parent
d6aea40326
commit
6cf0d4f91f
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue