Bug 1615494 - Initialize nsCID data structure properly to avoid uninitialized memory access. r=benc DONTBUILD
authorISHIKAWA, Chiaki <ishikawa@yk.rim.or.jp>
Mon, 17 Feb 2020 12:25:24 +0200
changeset 37359 7cb8dc8885cd70a12aa2340d1e4014d6a5b01b29
parent 37358 db3e1ee7a4181831f084a0952d40a8579156dfdd
child 37360 18d58b4ea283513be7051e5b0ab9e16b42e94c80
push id2566
push userclokep@gmail.com
push dateMon, 09 Mar 2020 19:20:31 +0000
treeherdercomm-beta@a352facfa0a4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbenc
bugs1615494
Bug 1615494 - Initialize nsCID data structure properly to avoid uninitialized memory access. r=benc DONTBUILD
mailnews/import/src/nsImportService.cpp
--- a/mailnews/import/src/nsImportService.cpp
+++ b/mailnews/import/src/nsImportService.cpp
@@ -369,16 +369,19 @@ nsresult nsImportService::LoadModuleInfo
 
   if (m_pModules == nullptr) m_pModules = new nsImportModuleList();
 
   // load the component and get all of the info we need from it....
   // then call AddModule
   nsresult rv;
 
   nsCID clsId;
+  // initialize
+  clsId.Clear();
+
   clsId.Parse(pClsId);
   nsCOMPtr<nsIImportModule> module = do_CreateInstance(clsId, &rv);
   if (NS_FAILED(rv)) return rv;
 
   nsString theTitle;
   nsString theDescription;
   rv = module->GetName(getter_Copies(theTitle));
   if (NS_FAILED(rv)) theTitle.AssignLiteral("Unknown");