Bug 1668926 - Fix uninitialised members in nsSpamSettings ctor. r=mkmelin
authorBen Campbell <benc@thunderbird.net>
Sun, 28 Nov 2021 12:26:04 +0200
changeset 34410 67f1933ecb62c7800a13337b8fce3c7cf8860ff2
parent 34409 f7faf67e6b5471390b28bb536fe1ad2c8d1cdd92
child 34411 4a1919cb94017cc2bbbb7514252973fafef249f3
push id19415
push usermkmelin@iki.fi
push dateSun, 28 Nov 2021 10:27:36 +0000
treeherdercomm-central@4a1919cb9401 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin
bugs1668926, 1137645
Bug 1668926 - Fix uninitialised members in nsSpamSettings ctor. r=mkmelin CID 1137645 Uninitialized scalar field The field will contain an arbitrary value left over from earlier computations. In nsSpamSettings::nsSpamSettings(): A scalar field is not initialized by the constructor Differential Revision: https://phabricator.services.mozilla.com/D132210
mailnews/base/src/nsSpamSettings.cpp
--- a/mailnews/base/src/nsSpamSettings.cpp
+++ b/mailnews/base/src/nsSpamSettings.cpp
@@ -35,17 +35,18 @@ using namespace mozilla::mailnews;
 nsSpamSettings::nsSpamSettings() {
   mLevel = 0;
   mMoveOnSpam = false;
   mMoveTargetMode = nsISpamSettings::MOVE_TARGET_MODE_ACCOUNT;
   mPurge = false;
   mPurgeInterval = 14;  // 14 days
 
   mServerFilterTrustFlags = 0;
-
+  mInhibitWhiteListingIdentityUser = false;
+  mInhibitWhiteListingIdentityDomain = false;
   mUseWhiteList = false;
   mUseServerFilter = false;
 
   nsresult rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR,
                                        getter_AddRefs(mLogFile));
   if (NS_SUCCEEDED(rv)) mLogFile->Append(u"junklog.html"_ns);
 }