mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-28 03:17:31 +09:00
Bug 1333038 - Use 'modern' pointers to fix crash due to nsMsgLineStreamBuffer object being deleted while still in use.
Suspected "use after free" in nsMsgLineStreamBuffer::ReadNextLine() leading to crash since object may be destroyed while still in use on another thread. Tag #1273
This commit is contained in:
parent
37c62668cb
commit
14590876b2
13 changed files with 14 additions and 26 deletions
|
|
@ -271,7 +271,6 @@ nsNNTPProtocol::nsNNTPProtocol(nsINntpIncomingServer *aServer, nsIURI *aURL,
|
|||
NNTP = PR_NewLogModule("NNTP");
|
||||
|
||||
m_ProxyServer = nullptr;
|
||||
m_lineStreamBuffer = nullptr;
|
||||
m_responseText = nullptr;
|
||||
m_dataBuf = nullptr;
|
||||
|
||||
|
|
@ -305,9 +304,6 @@ nsNNTPProtocol::~nsNNTPProtocol()
|
|||
m_nntpServer->WriteNewsrcFile();
|
||||
m_nntpServer->RemoveConnection(this);
|
||||
}
|
||||
if (m_lineStreamBuffer) {
|
||||
delete m_lineStreamBuffer;
|
||||
}
|
||||
if (mUpdateTimer) {
|
||||
mUpdateTimer->Cancel();
|
||||
mUpdateTimer = nullptr;
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ private:
|
|||
|
||||
nsCOMPtr<nsIAsyncInputStream> mDisplayInputStream;
|
||||
nsCOMPtr<nsIAsyncOutputStream> mDisplayOutputStream;
|
||||
nsMsgLineStreamBuffer * m_lineStreamBuffer; // used to efficiently extract lines from the incoming data stream
|
||||
RefPtr<nsMsgLineStreamBuffer> m_lineStreamBuffer; // used to efficiently extract lines from the incoming data stream
|
||||
// the nsINntpURL that is currently running
|
||||
nsCOMPtr<nsINntpUrl> m_runningURL;
|
||||
bool m_connectionBusy;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue