From 0af182baa2f35d91b8dfaf0b5a8fef06b77dd03a Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Wed, 28 Apr 2021 11:32:44 -0400 Subject: applets/web: Fix a use-after-free when passing in the URL string The URL string was being deleted before being used, leading to a use-after-free occurring when it is used afterwards. Fix this by taking the string by const ref to extend its lifetime, ensuring it doesn't get deleted before use. --- src/yuzu/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/yuzu/main.h') diff --git a/src/yuzu/main.h b/src/yuzu/main.h index 7f1e50a5b..98a608fce 100644 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h @@ -159,7 +159,7 @@ public slots: void SoftwareKeyboardExit(); void ErrorDisplayDisplayError(QString error_code, QString error_text); void ProfileSelectorSelectProfile(); - void WebBrowserOpenWebPage(std::string_view main_url, std::string_view additional_args, + void WebBrowserOpenWebPage(const std::string& main_url, const std::string& additional_args, bool is_local); void OnAppFocusStateChanged(Qt::ApplicationState state); -- cgit v1.2.3