Bug 1302478 - Fixed crash in nsMsgKeyArray::GetArray. r=rkent a=jorgk
authorJim Porter <squibblyflabbetydoo>
Wed, 19 Oct 2016 14:38:00 +0200
changeset 27618 207f1e141e6936f74c92a6145ed61f847820fcd7
parent 27617 8ea96a273d7ca538a414f72d004175b59f4024ef
child 27619 f4e61e60e3683ece0ced6d50743bb935dc4fb8ca
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrkent, jorgk
bugs1302478
Bug 1302478 - Fixed crash in nsMsgKeyArray::GetArray. r=rkent a=jorgk
mailnews/base/util/nsMsgKeyArray.cpp
--- a/mailnews/base/util/nsMsgKeyArray.cpp
+++ b/mailnews/base/util/nsMsgKeyArray.cpp
@@ -66,12 +66,12 @@ NS_IMETHODIMP nsMsgKeyArray::InsertEleme
 }
 
 NS_IMETHODIMP nsMsgKeyArray::GetArray(uint32_t *aCount, nsMsgKey **aKeys)
 {
   NS_ENSURE_ARG_POINTER(aCount);
   NS_ENSURE_ARG_POINTER(aKeys);
   *aCount = m_keys.Length();
   *aKeys =
-    (nsMsgKey *) nsMemory::Clone(&m_keys[0],
+    (nsMsgKey *) nsMemory::Clone(m_keys.begin(),
                                  m_keys.Length() * sizeof(nsMsgKey));
   return (*aKeys) ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
 }