mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-26 12:17:52 +00:00
SoundPlayer: Fix stack-use-after-scope when playing file in loop mode
The path returned by GUI:FilePicker is stored on the stack when the callback is executed. The player only stored a StringView to the path however it should take ownership of the path instead since the path is accessed even after the file menu open action has returned.
This commit is contained in:
parent
1e48cd35a1
commit
1476f02f99
Notes:
sideshowbarker
2024-07-18 01:22:07 +09:00
Author: https://github.com/swoertz
Commit: 1476f02f99
Pull-request: https://github.com/SerenityOS/serenity/pull/10839
Issue: https://github.com/SerenityOS/serenity/issues/10751
Reviewed-by: https://github.com/kleinesfilmroellchen ✅
Reviewed-by: https://github.com/trflynn89
2 changed files with 4 additions and 4 deletions
|
@ -38,7 +38,7 @@ Player::Player(Audio::ClientConnection& audio_client_connection)
|
|||
};
|
||||
}
|
||||
|
||||
void Player::play_file_path(StringView path)
|
||||
void Player::play_file_path(String const& path)
|
||||
{
|
||||
if (path.is_null())
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue