mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
anv: ensure device name contains terminating character
v2: Use sizeof() (Chris) CID: 1415113 Reported-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
This commit is contained in:
parent
f03f893cb8
commit
59adde0eab
1 changed files with 2 additions and 2 deletions
|
|
@ -891,8 +891,8 @@ void anv_GetPhysicalDeviceProperties(
|
|||
.sparseProperties = {0}, /* Broadwell doesn't do sparse. */
|
||||
};
|
||||
|
||||
strncpy(pProperties->deviceName, pdevice->name,
|
||||
VK_MAX_PHYSICAL_DEVICE_NAME_SIZE);
|
||||
snprintf(pProperties->deviceName, sizeof(pProperties->deviceName),
|
||||
"%s", pdevice->name);
|
||||
memcpy(pProperties->pipelineCacheUUID,
|
||||
pdevice->pipeline_cache_uuid, VK_UUID_SIZE);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue