CoverityID: 1358935

Signed-off-by: Eric Engestrom <e...@engestrom.ch>
---
 src/intel/vulkan/anv_device.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 046777d..e451138 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -566,7 +566,8 @@ void anv_GetPhysicalDeviceProperties(
       .sparseProperties = {0}, /* Broadwell doesn't do sparse. */
    };
 
-   strcpy(pProperties->deviceName, pdevice->name);
+   strncpy(pProperties->deviceName, pdevice->name, 
sizeof(pProperties->deviceName) - 1);
+   pProperties->deviceName[sizeof(pProperties->deviceName) - 1] = 0;
    anv_device_get_cache_uuid(pProperties->pipelineCacheUUID);
 }
 
-- 
2.8.3

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to