mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:07:45 +00:00
ProtocolServer: Fix null dereference in HTTP/HTTPS job finish callback
The consolidation of the initialization code between HTTP and HTTPS downloads was capturing the "job" local by reference, which was not safe after we left the init() scope. Fix this by getting the HTTP::Job from the Download object instead.
This commit is contained in:
parent
e8512b8cd7
commit
971425d7b1
3 changed files with 9 additions and 5 deletions
|
@ -39,6 +39,8 @@ public:
|
|||
virtual ~HttpDownload() override;
|
||||
static NonnullOwnPtr<HttpDownload> create_with_job(Badge<HttpProtocol>&&, ClientConnection&, NonnullRefPtr<HTTP::HttpJob>, NonnullOwnPtr<OutputFileStream>&&);
|
||||
|
||||
HTTP::HttpJob& job() { return m_job; }
|
||||
|
||||
private:
|
||||
explicit HttpDownload(ClientConnection&, NonnullRefPtr<HTTP::HttpJob>, NonnullOwnPtr<OutputFileStream>&&);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue