From c41451af75520a19b050347bb9c267b69773ff0a Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Wed, 2 Jun 2021 15:05:45 -0400 Subject: yuzu qt: Revert some usages of string_view Causes a heap-use-after free reported by AddressSanitizer. This makes use of std::filesystem::path, but due to that we have to use their string() function which may not work for all characters. --- src/yuzu/configuration/configure_per_game.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/yuzu/configuration/configure_per_game.h') diff --git a/src/yuzu/configuration/configure_per_game.h b/src/yuzu/configuration/configure_per_game.h index dc6b68763..a2d0211a3 100644 --- a/src/yuzu/configuration/configure_per_game.h +++ b/src/yuzu/configuration/configure_per_game.h @@ -28,7 +28,8 @@ class ConfigurePerGame : public QDialog { Q_OBJECT public: - explicit ConfigurePerGame(QWidget* parent, u64 title_id, std::string_view file_name); + // Cannot use std::filesystem::path due to https://bugreports.qt.io/browse/QTBUG-73263 + explicit ConfigurePerGame(QWidget* parent, u64 title_id, const std::string& file_name); ~ConfigurePerGame() override; /// Save all button configurations to settings file -- cgit v1.2.3