summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-02-12 22:28:22 +0100
committerAndreas Kling <kling@serenityos.org>2022-02-12 22:30:50 +0100
commit8b8a1449c4376b8ae17f1493ee69a65a982f045d (patch)
tree0e8f682ea20599eeaf2a14593e95ac0135f4e1c9 /Userland
parent3c108e20a79dad21bdbfa7da57edb2609114b636 (diff)
downloadserenity-8b8a1449c4376b8ae17f1493ee69a65a982f045d.zip
RequestServer: Make value copy of the URL in ensure_connection()
I saw what looked like a UAF of this URL in a RequestServer crash, and it seems reasonable to make a copy here since we end up passing them to Core::deferred_invoke().
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Services/RequestServer/ClientConnection.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Services/RequestServer/ClientConnection.cpp b/Userland/Services/RequestServer/ClientConnection.cpp
index 4c931391e6..80726e9b3b 100644
--- a/Userland/Services/RequestServer/ClientConnection.cpp
+++ b/Userland/Services/RequestServer/ClientConnection.cpp
@@ -126,7 +126,7 @@ void ClientConnection::ensure_connection(URL const& url, ::RequestServer::CacheL
}
struct {
- URL const& m_url;
+ URL m_url;
void start(Core::Stream::Socket& socket)
{
auto is_connected = socket.is_open();