From ea319dcc5ba097b84ac45b6c730ceac90ef1f458 Mon Sep 17 00:00:00 2001 From: Ludovico de Nittis <ludovico.denittis@collabora.com> Date: Wed, 20 Jan 2021 11:12:26 +0100 Subject: [PATCH] check-vulkan: zero-initialize the VkXcbSurfaceCreateInfoKHR variable If it's not zero-initialized, it could lead to a SEGV when we try to create the XCB surface. Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com> --- helpers/check-vulkan.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/check-vulkan.cpp b/helpers/check-vulkan.cpp index af5d3d8b4..677e191b0 100644 --- a/helpers/check-vulkan.cpp +++ b/helpers/check-vulkan.cpp @@ -277,7 +277,7 @@ private: throw std::runtime_error("Vulkan not supported on given X window"); } - VkXcbSurfaceCreateInfoKHR createSurfaceInfo; + VkXcbSurfaceCreateInfoKHR createSurfaceInfo = {}; createSurfaceInfo.sType = VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR; createSurfaceInfo.connection = xcb_connection; createSurfaceInfo.window = xcb_window; -- GitLab