anv: don't use strcpy for copying strings

CID: 1358935
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
This commit is contained in:
Lionel Landwerlin
2017-07-13 16:35:01 +01:00
parent 226fae7849
commit d1bd731e30

View File

@@ -895,7 +895,8 @@ void anv_GetPhysicalDeviceProperties(
.sparseProperties = {0}, /* Broadwell doesn't do sparse. */
};
strcpy(pProperties->deviceName, pdevice->name);
strncpy(pProperties->deviceName, pdevice->name,
VK_MAX_PHYSICAL_DEVICE_NAME_SIZE);
memcpy(pProperties->pipelineCacheUUID,
pdevice->pipeline_cache_uuid, VK_UUID_SIZE);
}