summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-10 22:20:52 -0500
committerMatt A. Tobin <email@mattatobin.com>2019-11-10 22:20:52 -0500
commit891ca8709adab06325b0f6e5432ffa4a620438bb (patch)
tree106888cc4ed324872db63c736538dadaa75d270c
parent0a8849ad686810acdbab4a3c8a1c539cf36258a7 (diff)
downloadUXP-891ca8709adab06325b0f6e5432ffa4a620438bb.tar
UXP-891ca8709adab06325b0f6e5432ffa4a620438bb.tar.gz
UXP-891ca8709adab06325b0f6e5432ffa4a620438bb.tar.lz
UXP-891ca8709adab06325b0f6e5432ffa4a620438bb.tar.xz
UXP-891ca8709adab06325b0f6e5432ffa4a620438bb.zip
Bug 1507718 - crash in nsImapProtocol::GetMessageSize(). Make m_hostSessionList an nsCOMPtr.
Tag #1273
-rw-r--r--mailnews/imap/src/nsImapProtocol.cpp4
-rw-r--r--mailnews/imap/src/nsImapProtocol.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/mailnews/imap/src/nsImapProtocol.cpp b/mailnews/imap/src/nsImapProtocol.cpp
index fd6b84d20..609a30e19 100644
--- a/mailnews/imap/src/nsImapProtocol.cpp
+++ b/mailnews/imap/src/nsImapProtocol.cpp
@@ -530,7 +530,7 @@ nsresult nsImapProtocol::Configure(int32_t TooFastTime, int32_t IdealTime,
NS_IMETHODIMP
-nsImapProtocol::Initialize(nsIImapHostSessionList * aHostSessionList,
+nsImapProtocol::Initialize(nsIImapHostSessionList *aHostSessionList,
nsIImapIncomingServer *aServer)
{
NS_PRECONDITION(aHostSessionList && aServer,
@@ -551,7 +551,7 @@ nsImapProtocol::Initialize(nsIImapHostSessionList * aHostSessionList,
aServer->GetUseCompressDeflate(&m_useCompressDeflate);
NS_ADDREF(m_flagState);
- m_hostSessionList = aHostSessionList; // no ref count...host session list has life time > connection
+ m_hostSessionList = aHostSessionList;
m_parser.SetHostSessionList(aHostSessionList);
m_parser.SetFlagState(m_flagState);
diff --git a/mailnews/imap/src/nsImapProtocol.h b/mailnews/imap/src/nsImapProtocol.h
index 53db32f96..ba2594c89 100644
--- a/mailnews/imap/src/nsImapProtocol.h
+++ b/mailnews/imap/src/nsImapProtocol.h
@@ -619,7 +619,7 @@ private:
nsDataHashtable<nsCStringHashKey, int32_t> m_specialXListMailboxes;
- nsIImapHostSessionList * m_hostSessionList;
+ nsCOMPtr<nsIImapHostSessionList> m_hostSessionList;
bool m_fromHeaderSeen;