From 8b8a1449c4376b8ae17f1493ee69a65a982f045d Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 12 Feb 2022 22:28:22 +0100 Subject: [PATCH] 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(). --- Userland/Services/RequestServer/ClientConnection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();