diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2021-04-28 11:32:44 -0400 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2021-04-28 12:34:28 -0400 |
commit | 0af182baa2f35d91b8dfaf0b5a8fef06b77dd03a (patch) | |
tree | e38c0517595bffd75e5b3df06084fce8531c48f1 /src/yuzu/main.h | |
parent | b096ec68cdbf6f1064a8b6b855489d38c3e59f6a (diff) |
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.
Diffstat (limited to 'src/yuzu/main.h')
-rw-r--r-- | src/yuzu/main.h | 2 |
1 files changed, 1 insertions, 1 deletions
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); |