From: Lionel Landwerlin Date: Thu, 13 Jul 2017 15:35:01 +0000 (+0100) Subject: anv: don't use strcpy for copying strings X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d1bd731e3014a9e16d4c24da439831c1cc745ef5;p=mesa.git anv: don't use strcpy for copying strings CID: 1358935 Signed-off-by: Lionel Landwerlin Reviewed-by: Anuj Phogat --- diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 39c907e9f2d..d3607deccfc 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -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); }