diff options
author | Lionel Landwerlin <[email protected]> | 2017-07-13 16:35:01 +0100 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2017-07-13 22:50:47 +0100 |
commit | d1bd731e3014a9e16d4c24da439831c1cc745ef5 (patch) | |
tree | 24937e164b60cafdc6bdbcf46d4d0c83c9958e3f /src | |
parent | 226fae7849ca45ed02f4aca064875b69dfe44a54 (diff) |
anv: don't use strcpy for copying strings
CID: 1358935
Signed-off-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/vulkan/anv_device.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |