Explorar el Código

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.
lat9nq hace 5 años
padre
commit
33ed02a239
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/yuzu/configuration/configure_graphics.cpp

+ 1 - 1
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));
     }