From 33ed02a239752b7db26e89b5d707a0f28274bbc8 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Sun, 4 Apr 2021 15:02:35 -0400 Subject: [PATCH] configure_graphics: Prevent stack-use-after-scope Address Sanitizer reports stack-use-after-scope on line 231 `vulkan_devices.push_back(QString::fromStdString(name));`. Instead of using a pointer, copy the string into a std::string and use that, instead. --- src/yuzu/configuration/configure_graphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yuzu/configuration/configure_graphics.cpp b/src/yuzu/configuration/configure_graphics.cpp index 9ff32aec4d..49acc48b22 100644 --- a/src/yuzu/configuration/configure_graphics.cpp +++ b/src/yuzu/configuration/configure_graphics.cpp @@ -227,7 +227,7 @@ void ConfigureGraphics::RetrieveVulkanDevices() try { vulkan_devices.clear(); vulkan_devices.reserve(physical_devices.size()); for (const VkPhysicalDevice device : physical_devices) { - const char* const name = vk::PhysicalDevice(device, dld).GetProperties().deviceName; + const std::string name = vk::PhysicalDevice(device, dld).GetProperties().deviceName; vulkan_devices.push_back(QString::fromStdString(name)); }