Closed Bug 1668926 Opened 5 years ago Closed 2 years ago

fix a few code issues found by coverity

Categories

(MailNews Core :: General, defect)

defect

Tracking

(thunderbird_esr78 wontfix, thunderbird82 wontfix, thunderbird_esr115 unaffected)

RESOLVED FIXED
83 Branch
Tracking Status
thunderbird_esr78 --- wontfix
thunderbird82 --- wontfix
thunderbird_esr115 --- unaffected

People

(Reporter: mkmelin, Assigned: mkmelin)

Details

(Keywords: coverity, leave-open)

Attachments

(106 files, 1 obsolete file)

1.39 KB, patch
benc
: review+
Details | Diff | Splinter Review
2.11 KB, patch
benc
: review+
Details | Diff | Splinter Review
5.57 KB, patch
benc
: review+
Details | Diff | Splinter Review
2.12 KB, patch
gds
: review+
Details | Diff | Splinter Review
1.75 KB, patch
gds
: review+
Details | Diff | Splinter Review
2.08 KB, patch
gds
: review+
Details | Diff | Splinter Review
1.48 KB, patch
benc
: review+
Details | Diff | Splinter Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

Filing this to fix a few minor issues found by coverity.

Attachment #9179362 - Flags: review?(benc)
Status: NEW → ASSIGNED
Attachment #9179363 - Flags: review?(benc)
Attachment #9179364 - Flags: review?(benc)
Attachment #9179362 - Flags: review?(benc) → review+
Attachment #9179363 - Flags: review?(benc) → review+
Comment on attachment 9179364 [details] [diff] [review] bug1668926_coverity.part3.patch Review of attachment 9179364 [details] [diff] [review]: ----------------------------------------------------------------- Always so nice seeing things no longer needed to be checked for null!
Attachment #9179364 - Flags: review?(benc) → review+

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/ce7ae5738f35
remove unused member variable mContextID. r=benc
https://hg.mozilla.org/comm-central/rev/6dfec5046f6a
ensure nsMsgComposeSecure::MimeCryptoHackCerts doesn't return an uninitialized value. r=benc
https://hg.mozilla.org/comm-central/rev/0585e09a6a4e
for nsMsgAccountManager::SetSpecialFolder don't set rv and not use it. r=benc DONTBUILD

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED

(Basically code clean-up, not worth uplifting.)

Target Milestone: --- → 83 Branch

Going to add a few more cases here.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #9180864 - Flags: review?(gds)
Attachment #9180866 - Flags: review?(gds)
Attachment #9180867 - Flags: review?(gds)
Comment on attachment 9180864 [details] [diff] [review] bug1668926_coverity_part4.patch Review of attachment 9180864 [details] [diff] [review]: ----------------------------------------------------------------- Looking back at oldest stuff in dxr, userCancelled was never used.
Attachment #9180864 - Flags: review?(gds) → review+
Comment on attachment 9180866 [details] [diff] [review] bug1668926_coverity_part5.patch Review of attachment 9180866 [details] [diff] [review]: ----------------------------------------------------------------- The problem here seems to be the precedence of && vs. ?. The && is higher prec. so effectively the code is this: if ((ns && gHideOtherUsersFromList) ? (ns->GetType() != kOtherUsersNamespace) : true) { I don't think this is what's intended. I think your change will work but a simpler change might be just to add parens around the ?: like this: if (ns && (gHideOtherUsersFromList ? (ns->GetType() != kOtherUsersNamespace) : true)) {
Attachment #9180866 - Flags: review?(gds) → review+
Attachment #9180867 - Flags: review?(gds) → review+
Keywords: leave-open
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/0ab29c9ebf46 remove dead code (userCancelled). r=gene https://hg.mozilla.org/comm-central/rev/146bd8c2098e fix null pointer dereference in nsImapProtocol::DiscoverAllAndSubscribedBoxes. r=gene https://hg.mozilla.org/comm-central/rev/1818b9c8d603 fix null pointer dereference in nsImapProtocol::RenameHierarchyByHand. r=gene

(In reply to gene smith from comment #12)
You're right that would have been a "simpler" fix, but I wanted to make it readable. What we had there was pretty unusual and obscure.

(In reply to Magnus Melin [:mkmelin] from comment #14)

(In reply to gene smith from comment #12)
You're right that would have been a "simpler" fix, but I wanted to make it readable. What we had there was pretty unusual and obscure.

This might be a bit more readable. It eliminates the extra if, the continue and referencing gHideOtherUsersFromList a 2nd time:

    if (ns && (!gHideOtherUsersFromList || (ns->GetType() != kOtherUsersNamespace))) {

I might be missing something and, since already pushed, not a big deal.

Attachment #9182203 - Flags: review?(benc)
Comment on attachment 9182203 [details] [diff] [review] bug1668926_coverity_part7.patch Review of attachment 9182203 [details] [diff] [review]: ----------------------------------------------------------------- It should be `delete prefBranch` rather than free(), but other than that it looks good to me.
Attachment #9182203 - Flags: review?(benc) → review+
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/97259d5cb08e fix resource leak in nsSeamonkeyProfileMigrator::ReadBranch. r=benc

Found by coverity. leaked_storage: Variable newFileStream going out of scope leaks the storage it points to.

CID 1137477

Depends on D111541

Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/c22e27662a7d fix resource leakage in MsgGetFileStream. r=benc

CID 1260149 (#1 of 1): Resource leak (RESOURCE_LEAK)50. leaked_storage: Variable newTerm going out of scope leaks the storage it points to

CID 451007 (#1 of 1): Uninitialized scalar variable (UNINIT)6. uninit_use: Using uninitialized value newFlags.

Depends on D111611

CID 450452 (#1 of 1): Uninitialized scalar variable (UNINIT)5. uninit_use: Using uninitialized value flagOperation

Depends on D111612

uninit_member: Non-static class member m_folderName is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member m_showAttachmentsInline is not initialized in this constructor nor in any functions that it calls.

CID 1473470 (#3 of 3): Uninitialized scalar field (UNINIT_CTOR)9. uninit_member: Non-static class member m_contentModified is not initialized in this constructor nor in any functions that it calls.

Depends on D111613

CID 1468065 (#1 of 1): Useless call (USELESS_CALL)side_effect_free: Calling database.CloseMDB(false) is only useful for its return value, which is ignored.

Depends on D111614

CID 1467532 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)overflow_before_widen: Potentially overflowing expression purgeThreshold * 1024 with type int (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type int64_t (64 bits, signed).

Depends on D111615

CID 1467528 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)2. uninit_member: Non-static class member m_identitiesValid is not initialized in this constructor nor in any functions that it calls.

Depends on D111616

CID 1473460 (#1 of 1): Dereference before null check (REVERSE_INULL)check_after_deref: Null-checking this->m_parentPart suggests that it may be null, but it has already been dereferenced on all paths leading to the check

Depends on D111617

CID 1459799 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)2. uninit_member: Non-static class member mResult is not initialized in this constructor nor in any functions that it calls.

Depends on D111618

CID 1417611: Dereference before null check (REVERSE_INULL)
notnull: At condition curPos, the value of curPos cannot be nullptr.
dead_error_condition: The condition curPos must be true.

CID 1417612 (#1 of 1): Logically dead code (DEADCODE)dead_error_line: Execution cannot reach the expression NS_MsgCreatePathStringFromFolderURI(curPos, newPath, nsTLiteralString<char>(operator "" _ns("none", 4UL)).operator nsTString const &(), false) inside this statement: NS_MsgCreatePathStringFromF....

Depends on D111619

uninit_member: Non-static class member m_startTime is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member m_parsingDone is not initialized in this constructor nor in any functions that it calls.

CID 1260151 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)6. uninit_member: Non-static class member m_urlInProgress is not initialized in this constructor nor in any functions that it calls.

Depends on D111620

CID 1137658 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)3. uninit_member: Non-static class member m_meteorsSpinning is not initialized in this constructor nor in any functions that it calls.

Depends on D111621

CID 1416479 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)2. uninit_member: Non-static class member mResult is not initialized in this constructor nor in any functions that it calls.

Depends on D111622

CID 1137656 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)2. uninit_member: Non-static class member m_offlineMsgSize is not initialized in this constructor nor in any functions that it calls.

Depends on D111623

Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/84e823639a2c ensure SignedStatusRunnable::SignedStatusRunnable mResult is initialized. r=benc https://hg.mozilla.org/comm-central/rev/83fc325f1b85 fix "logicallly dead code" in nsLocalURI2Path. r=benc https://hg.mozilla.org/comm-central/rev/3fe04c3f4bd2 fix missing member variable initialization for nsMsgMailboxParser::nsMsgMailboxParser. r=benc https://hg.mozilla.org/comm-central/rev/fcc1b39fa6f6 fix missing member initialization in MsgStatusFeedback. r=benc https://hg.mozilla.org/comm-central/rev/6f980569be2e fix member initialization in nsMessenger::nsFilePickerShownCallback::nsFilePickerShownCallback. r=benc https://hg.mozilla.org/comm-central/rev/ee74ba64e005 fix missing member initialization in nsOfflineStoreCompactState. r=benc
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/1b8ef5a2677e initialize m_identitiesValid in nsMsgAccount::nsMsgAccount(). r=benc
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/b882cca05903 fix uninitialized members in nsImapBodyShell::nsImapBodyShell. r=benc https://hg.mozilla.org/comm-central/rev/8037e5a525a0 remove useless database.CloseMDB(false) call from ReadMABToDirectory. r=benc https://hg.mozilla.org/comm-central/rev/40e39fc9d587 fix unintentional integer overflow in nsMsgDBFolder::HandleAutoCompactEvent. r=benc https://hg.mozilla.org/comm-central/rev/42cee3c8ade3 fix null pointer dereference in nsIMAPBodypartLeaf::ShouldFetchInline. r=benc
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/1c408ff90042 fix resource leak in nsMsgFilterList::ParseCondition. r=benc https://hg.mozilla.org/comm-central/rev/5e4c0287b29e fix "Using uninitialized value newFlags" issue in nsImapOfflineSync::ProcessFlagOperation. r=benc https://hg.mozilla.org/comm-central/rev/2c87417c1826 fix for "Using uninitialized value flagOperation" in nsImapOfflineSync::ProcessFlagOperation. r=benc

Coverify: CID 1468064 (#2 of 2): Unused value (UNUSED_VALUE)returned_value: Assigning value from this->SendData(")\r\n", false) to rv here, but that stored value is overwritten before it can be used

CID 1473461 (#1 of 1): Unused value (UNUSED_VALUE)returned_value: Assigning value from this->GetClearedOriginalOp(sourceOp.operator nsIMsgOfflineImapOperation *(), nsGetterAddRefs<nsIMsgOfflineImapOperation>(getter_AddRefs(originalOp)).operator nsIMsgOfflineImapOperation **(), nsGetterAddRefs<nsIMsgDatabase>(getter_AddRefs(originalDB)).operator nsIMsgDatabase **()) to rv here, but that stored value is overwritten before it can be used.

CID 1467521 (#1 of 1): Unused value (UNUSED_VALUE)returned_value: Assigning value from MimeWriteAString(obj, nsTLiteralString<char>(operator "" _ns(""\nContent-Transfer-Encoding: 8bit\n", 34UL)).operator nsTString const &()) to status here, but that stored value is overwritten before it can be used.

CID 1467514 (#1 of 1): Unused value (UNUSED_VALUE)returned_value: Assigning value from aCmdLine->FindFlag(nsTLiteralString<char16_t>(operator "" _ns(L"url", 3UL)).operator nsTString const &(), false, &found) to rv here, but that stored value is overwritten before it can be used.

CID 1459736 (#1 of 1): Unchecked return value (CHECKED_RETURN)7. check_return: Calling MimePartBufferRead without checking return value (as is done elsewhere 6 out of 7 times).

In MimeEncrypted_emit_buffered_child(MimeObject *): Value returned from a function is not checked for errors before being used.

CID 1417626 (#1 of 1): Unused value (UNUSED_VALUE)returned_value: Assigning value from this->InitStringBundle() to rv here, but that stored value is overwritten before it can be used.

In nsMessenger::​GetString(nsTString<char16_t> const &, nsTString<char16_t> &): A value assigned to a variable is never used.

CID 1417617 (#1 of 1): Unused value (UNUSED_VALUE)returned_value: Assigning value from this->CreateDirectoryForFolder(nsGetterAddRefs<nsIFile>(getter_AddRefs(dirFile)).operator nsIFile **()) to rv here, but that stored value is overwritten before it can be used.

In nsImapMailFolder::​RenameLocal(nsTSubstring<char> const &, nsIMsgFolder *): A value assigned to a variable is never used.

CID 1364639 (#1 of 1): Unused value (UNUSED_VALUE)returned_value: Assigning value from bundle->FormatStringFromName("imapOtherUsersFolderTypeDescription", params, folderTypeDesc) to rv here, but that stored value is overwritten before it can be used.

Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/04c079de9284 fix unused return value in nsImapMailFolder::FillInFolderProps. r=benc https://hg.mozilla.org/comm-central/rev/9b4948af3451 fix unchecked return value in MimeEncrypted_emit_buffered_child. r=benc https://hg.mozilla.org/comm-central/rev/314480fbc9aa fix unchecked return value in nsMessenger::GetString. r=benc https://hg.mozilla.org/comm-central/rev/0547b34a09cf fix unchecked return value in nsImapMailFolder::RenameLocal. r=benc https://hg.mozilla.org/comm-central/rev/3448364c2cdd fix unused rv in nsMsgComposeService::Handle. r=benc https://hg.mozilla.org/comm-central/rev/b23f88f797de fix unused status in MimeMultipart_parse_line. r=benc https://hg.mozilla.org/comm-central/rev/0b4931263b9b fix unused rv in nsImapMailFolder::CopyMessagesOffline. r=benc https://hg.mozilla.org/comm-central/rev/07d54075bf94 fix unused rv in nsImapProtocol::UploadMessageFromFile. r=benc

QuotingOutputStreamListener::InsertToCompose is only ever called with non-null editor.

CID 1439453 Dereference after null check
Either the check against null is unnecessary, or there may be a null pointer dereference.
In QuotingOutputStreamListener::​InsertToCompose(nsIEditor *, bool): Pointer is checked against null but then dereferenced anyway

CID 1420660 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.

In ForceDBClosedRunnable::​ForceDBClosedRunnable(nsIMsgFolder *): A scalar field is not initialized by the constructor

CID 1420659 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.

In GetParentRunnable::​GetParentRunnable(nsIMsgFolder *, nsIMsgFolder **): A scalar field is not initialized by the constructor

CID 1420658 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.

In GenerateUniqueSubfolderNameRunnable::​GenerateUniqueSubfolderNameRunnable(nsIMsgFolder *, nsTSubstring<char16_t> const &, nsIMsgFolder *, nsTSubstring<char16_t> &): A scalar field is not initialized by the constructor

CID 1420657 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.

In GetSubFoldersRunnable::​GetSubFoldersRunnable(nsIMsgFolder *): A scalar field is not initialized by the constructor

CID 1420653 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.

In CreateSubfolderRunnable::​CreateSubfolderRunnable(nsIMsgFolder *, nsTSubstring<char16_t> const &): A scalar field is not initialized by the constructor

CID 1137504 Dereference before null check

There may be a null pointer dereference, or else the comparison against null is unnecessary.

In nsAbDirectoryQuery::​query(nsIAbDirectory *, nsIAbBooleanExpression *, nsIAbDirSearchListener *, bool, int *): All paths that lead to this null pointer comparison already dereference the pointer earlier

CID 1478010 Dereference after null check

Either the check against null is unnecessary, or there may be a null pointer dereference.

In nsImapMockChannel::OnCacheEntryAvailable(nsICacheEntry *, bool, nsresult): Pointer is checked against null but then dereferenced anyway

CID 450527 Resource leak

The system resource will not be reclaimed and reused, reducing the future availability of the resource.

In nsImapServerResponseParser::namespace_data(): Leak of memory or pointers to system resources

CID 1473470 Uninitialized pointer field

The pointer field will point to an arbitrary memory location, any attempt to write may cause corruption.

In nsImapBodyShell::nsImapBodyShell(nsImapProtocol *, nsIMAPBodypartMessage *, unsigned int, unsigned int, char const *): A pointer field is not initialized in the constructor

CID 1137570 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.

In nsMsgRuleAction::nsMsgRuleAction(): A scalar field is not initialized by the constructor

CID 1137569 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.

In nsMsgFilter::nsMsgFilter(): A scalar field is not initialized by the constructor

CID 1137568 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.

In nsDBFolderInfo::nsDBFolderInfo(nsMsgDatabase *): A scalar field is not initialized by the constructor

CID 1137567 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.

In nsImapMailDatabase::nsImapMailDatabase(): A scalar field is not initialized by the constructor

CID 1137562 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.

In nsMsgHdr::nsMsgHdr(nsMsgDatabase *, nsIMdbRow *): A scalar field is not initialized by the constructor

CID 1137560 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.

In nsMsgSearchTerm::nsMsgSearchTerm(int, int, nsIMsgSearchValue , int, char const): A scalar field is not initialized by the constructor

CID 1137559 Uninitialized pointer field

The pointer field will point to an arbitrary memory location, any attempt to write may cause corruption.

In nsMsgSearchScopeTerm::nsMsgSearchScopeTerm(nsIMsgSearchSession *, int, nsIMsgFolder *): A pointer field is not initialized in the constructor

CID 1137558 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.

In nsMsgMdnGenerator::nsMsgMdnGenerator(): A scalar field is not initialized by the constructor

CID 1137557 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.

In nsMsgComposeSecure::nsMsgComposeSecure(): A scalar field is not initialized by the constructor

CID 1137554 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.

In nsDelAttachListener::nsDelAttachListener(): A scalar field is not initialized by the constructor

CID 1137507 Dereference before null check

There may be a null pointer dereference, or else the comparison against null is unnecessary.

In nsMsgDBView::DetermineActionsForJunkChange(bool, nsIMsgFolder *, bool &, bool &, nsIMsgFolder **): All paths that lead to this null pointer comparison already dereference the pointer earlier

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/eff01364ae13
Fix uninitialised members in nsMsgRuleAction ctor. r=mkmelin
https://hg.mozilla.org/comm-central/rev/1200b74f7926
Fix uninitialised member in nsMsgFilter ctor. r=mkmelin
https://hg.mozilla.org/comm-central/rev/e2908d77e424
Fix uninitialised members in nsDBFolderInfo ctor. r=mkmelin
https://hg.mozilla.org/comm-central/rev/63b1b715c390
Fix uninitialised members in nsImapMailDatabase ctor. r=mkmelin
https://hg.mozilla.org/comm-central/rev/7a130040750f
Remove unused member in nsMsgHdr. r=mkmelin
https://hg.mozilla.org/comm-central/rev/be673031cce9
Fix uninitialised members in nsMsgSearchTerm ctor. r=mkmelin
https://hg.mozilla.org/comm-central/rev/ad7ae96809ab
Remove unused member in nsMsgSearchScopeTerm. r=mkmelin
https://hg.mozilla.org/comm-central/rev/afafa8b0708d
Fix uninitialised members in nsMsgMdnGenerator ctor. r=mkmelin
https://hg.mozilla.org/comm-central/rev/bc03150fe709
Fix uninitialised members in nsMsgComposeSecure ctor. r=mkmelin
https://hg.mozilla.org/comm-central/rev/829f052a76c2
Fix uninitialised members in nsDelAttachListener ctor. r=mkmelin
https://hg.mozilla.org/comm-central/rev/373945b66658
Fix dereference before null check in nsMsgDBView::DetermineActionsForJunkChange(). r=mkmelin

Hey Ben, two requests:

  • When you upload a stack of patches like the ones I've just landed, can you link them all together in Phabricator? (moz-phab first-rev last-rev should do it automagically.) Even though they're not necessarily dependent on each other, it makes them so much easier to land.
  • Stop using the r?somebody syntax, it doesn't actually achieve anything, and means I have to edit your commit messages if I land them manually. (You probably got the idea from me, but I've seen the error in my ways and stopped.)
Pushed by geoff@darktrojan.net: https://hg.mozilla.org/comm-central/rev/821bda90adff follow-up - Fix initialisation order of nsDBFolderInfo fields. rs=bustage-fix

(In reply to Geoff Lankow (:darktrojan) from comment #73)

  • When you upload a stack of patches like the ones I've just landed, can you link them all together in Phabricator? (moz-phab first-rev last-rev should do it automagically.) Even though they're not necessarily dependent on each other, it makes them so much easier to land.

Oh, yes - gladly! It was a pain going through and submitting them all individually!

  • Stop using the r?somebody syntax, it doesn't actually achieve anything, and means I have to edit your commit messages if I land them manually. (You probably got the idea from me, but I've seen the error in my ways and stopped.)

Will do. I was having second thoughts about it, so nice to have confirmation. I'll update the docs too.

CID 1473471 Unused value

An assigned value that is never used may represent unnecessary computation, an incorrect algorithm, or possibly the need for cleanup or refactoring.

In nsMsgComposeAndSend::Init(nsIMsgIdentity *, char const *, nsMsgCompFields *, nsIFile *, bool, bool, int, nsIMsgDBHdr *, char const *, nsTSubstring<char> const &, nsTArray<RefPtr<nsIMsgAttachedFile>> const &, nsTSubstring<char16_t> const &, nsTSubstring<char> const &, int): A value assigned to a variable is never used.

Also:

  • Moves the two Allocate*() member fns from public to private.
  • Removes the unused GetFolderNameWithoutNamespace().
  • Converts GenerateFullFolderNameWithDefaultNamespace() to return nsCString rather than char*, to fix a memory leak in nsImapService.

CID 1473469 Overlapping buffer in memory copy

Results in an undefined behavior

In nsImapNamespaceList::AllocateCanonicalFolderName(char const *, char): Buffers may be overlapping in a string copy function

Depends on D125907

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/6101012f0de3
Fix overlapping buffer in memory copy in nsImapNamespaceList::AllocateCanonicalFolderName(). r=mkmelin

Attachment #9241697 - Attachment is obsolete: true

CID 1361810 Unused value

An assigned value that is never used may represent unnecessary computation, an incorrect algorithm, or possibly the need for cleanup or refactoring.

In nsNetscapeProfileMigratorBase::​RecursiveCopy(nsIFile *, nsIFile *): A value assigned to a variable is never used.

CID 1272795 Dereference after null check

Either the check against null is unnecessary, or there may be a null pointer dereference.

In MimeHandleDecryptedOutputLine(char *, int, MimeObject *): Pointer is checked against null but then dereferenced anyway


I think there are cases where options ends up being null.

CID 1270738 Unused value

An assigned value that is never used may represent unnecessary computation, an incorrect algorithm, or possibly the need for cleanup or refactoring.
In nsMsgComposeSecure::​MimeFinishEncryption(bool, nsIMsgSendReport *): A value assigned to a variable is never used.

CID 1260187 Unused value

An assigned value that is never used may represent unnecessary computation, an incorrect algorithm, or possibly the need for cleanup or refactoring.

In nsMsgDBFolder::​SetBiffState(unsigned int): A value assigned to a variable is never used.

CID 1260181 Unused value

An assigned value that is never used may represent unnecessary computation, an incorrect algorithm, or possibly the need for cleanup or refactoring.
In nsMsgDBView::​GetThreadRootIndex(nsIMsgDBHdr *): A value assigned to a variable is never used.

CID 1137603 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.
In nsMsgDBView::​nsMsgDBView(): A scalar field is not initialized by the constructor

Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/b55b92de3e60 coverity - fix unused value in nsNetscapeProfileMigratorBase::​RecursiveCopy. r=benc https://hg.mozilla.org/comm-central/rev/fe41948bb3f4 coverity - fix dereference after null check in MimeHandleDecryptedOutputLine. r=benc https://hg.mozilla.org/comm-central/rev/e7d4983891a0 coverity - fix unused value in nsMsgComposeSecure::​MimeFinishEncryption. r=benc https://hg.mozilla.org/comm-central/rev/05fcce64352a coverity - fix unused value in nsMsgDBFolder::​SetBiffState. r=benc https://hg.mozilla.org/comm-central/rev/1edc038287d6 coverity - fix unused value in nsMimeBaseEmitter::​MimeGetStringByName. r=benc https://hg.mozilla.org/comm-central/rev/e3afb09717d2 coverity - fix unused value in nsMsgDBView::​GetThreadRootIndex. r=benc https://hg.mozilla.org/comm-central/rev/1825c0764f2e coverity - fix Uninitialized scalar field in nsMsgDBView::​nsMsgDBView. r=benc

CID 1137394 Explicit null dereferenced

A null pointer dereference will occur.
In nsParseMailMessageState::​nsParseMailMessageState(): Dereference of an explicit null value

CID 450579 Resource leak
The system resource will not be reclaimed and reused, reducing the future availability of the resource.
In MIMEGetRelativeCryptoNestLevel(MimeObject *): Leak of memory or pointers to system resources

CID 1137494 Resource leak

The system resource will not be reclaimed and reused, reducing the future availability of the resource.
In mime_display_stream_complete: Leak of memory or pointers to system resources

CID 1137580 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.
In nsMsgCompose::​nsMsgCompose(): A scalar field is not initialized by the constructor

Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/821f92c56219 coverity - fix null pointer dereference in nsParseMailMessageState::​nsParseMailMessageState. r=benc https://hg.mozilla.org/comm-central/rev/d9e5a49d2882 coverity - fix resource leak in MIMEGetRelativeCryptoNestLevel. r=benc https://hg.mozilla.org/comm-central/rev/308cd40b2506 coverity - fix resource leak in mime_display_stream_complete. r=benc https://hg.mozilla.org/comm-central/rev/c3f510ffc41c coverity - fix uninitialized scalar field in nsMsgCompose::​nsMsgCompose(). r=benc
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/024cda4c0ce1 followup to 821f92c562196e321f474c6404ba19b8518b72cb - fix it null pointer dereference properly. rs=bustage-fix DONTBUILD

CID 1137573 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.
In nsMsgAsyncWriteProtocol::​nsMsgAsyncWriteProtocol(nsIURI *): A scalar field is not initialized by the constructor (CWE-457)

CID 1260165 Unused value

An assigned value that is never used may represent unnecessary computation, an incorrect algorithm, or possibly the need for cleanup or refactoring.
In nsMsgThreadedDBView::​Sort(int, int): A value assigned to a variable is never used.

CID 1260176 Unused value

An assigned value that is never used may represent unnecessary computation, an incorrect algorithm, or possibly the need for cleanup or refactoring.
In nsMsgQuickSearchDBView::​GetFirstMessageHdrToDisplayInThread(nsIMsgThread *, nsIMsgDBHdr **): A value assigned to a variable is never used.

CID 1260178 Unused value
An assigned value that is never used may represent unnecessary computation, an incorrect algorithm, or possibly the need for cleanup or refactoring.
In nsMsgMdnGenerator::​OutputAllHeaders(): A value assigned to a variable is never used

CID 1260179 Unused value

An assigned value that is never used may represent unnecessary computation, an incorrect algorithm, or possibly the need for cleanup or refactoring.
In nsMsgFilter::​SaveRule(nsIOutputStream *): A value assigned to a variable is never used.

CID 1260181 Unused value

An assigned value that is never used may represent unnecessary computation, an incorrect algorithm, or possibly the need for cleanup or refactoring.
In nsMsgDBView::​GetThreadRootIndex(nsIMsgDBHdr *): A value assigned to a variable is never used

CID 1260189 Unused value

An assigned value that is never used may represent unnecessary computation, an incorrect algorithm, or possibly the need for cleanup or refactoring.
In nsMsgLocalMailFolder::​CopyFolderLocal(nsIMsgFolder *, bool, nsIMsgWindow *, nsIMsgCopyServiceListener *): A value assigned to a variable is never used.

CID 1137629 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.
In nsMsgGroupView::​nsMsgGroupView(): A scalar field is not initialized by the constructor

CID 450202 Logically dead code

dead_error_condition: The condition startOfAttribute must be true.

CID 1137379 Logically dead code
notnull: At condition currentPath, the value of currentPath cannot be nullptr.

CID 1137394 Explicit null dereferenced

A null pointer dereference will occur.
In nsParseMailMessageState::​nsParseMailMessageState(): Dereference of an explicit null value

Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/a9c2c2ba5c92 coverity - fix null pointer dereference for m_customDBHeaders in nsParseMailMessageState::​nsParseMailMessageState. r=benc https://hg.mozilla.org/comm-central/rev/76330ce98f84 coverity - fix unused value in nsMsgDBView::​GetThreadRootIndex. r=benc https://hg.mozilla.org/comm-central/rev/74fbc318640d coverity - fix unused value in nsMsgLocalMailFolder::​CopyFolderLocal. r=benc https://hg.mozilla.org/comm-central/rev/c10338fd057b coverity - fix Uninitialized scalar field in nsMsgGroupView::​nsMsgGroupView(). r=benc https://hg.mozilla.org/comm-central/rev/abe057761120 coverity - fix logically dead code in nsMailboxUrl extractAttributeValue. r=benc https://hg.mozilla.org/comm-central/rev/77b674564bae coverity - fix logically dead code in nsImapUrl::​AllocateCanonicalPath. r=benc
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/b28d645619bf coverity - fix unused value in nsMsgFilter::​SaveRule. r=benc https://hg.mozilla.org/comm-central/rev/14044170f385 coverity - fix Uninitialized scalar field in nsMsgAsyncWriteProtocol::​nsMsgAsyncWriteProtocol. r=benc https://hg.mozilla.org/comm-central/rev/5d7125415bf0 coverity - fix unused value in sMsgThreadedDBView::​Sort. r=benc https://hg.mozilla.org/comm-central/rev/efae3d4c52bc coverity - fix unused value in nsMsgQuickSearchDBView::​GetFirstMessageHdrToDisplayInThread. r=benc https://hg.mozilla.org/comm-central/rev/bdfa9aab9987 coverity - fix unused value in nsMsgMdnGenerator::​OutputAllHeaders. r=benc

CID 1137611 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.
In nsImapProtocol::​nsImapProtocol(): A scalar field is not initialized by the constructor

CID 137604 Uninitialized pointer field
The pointer field will point to an arbitrary memory location, any attempt to write may cause corruption.
In nsImapMailboxSpec::​nsImapMailboxSpec(): A pointer field is not initialized in the constructor

CID 1137608 Uninitialized scalar field
The field will contain an arbitrary value left over from earlier computations.
In nsMsgAccountManager::​nsMsgAccountManager(): A scalar field is not initialized by the constructo

Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/fe9729a547e1 fix unitialized members in nsImapProtocol::​nsImapProtocol. r=benc https://hg.mozilla.org/comm-central/rev/3516c98af29f fix unitialized pointer field in nsImapMailboxSpec::​nsImapMailboxSpec. r=benc https://hg.mozilla.org/comm-central/rev/089a146150be fix unitialized scalar field in nsMsgAccountManager::​nsMsgAccountManager. r=benc

CID 1260151 Uninitialized scalar field
The field will contain an arbitrary value left over from earlier computations.
In nsMsgMailboxParser::nsMsgMailboxParser(): A scalar field is not initialized by the constructor (CWE-457)

CID 1137653 Uninitialized scalar field
The field will contain an arbitrary value left over from earlier computations.
In nsMailboxProtocol::nsMailboxProtocol(nsIURI *): A scalar field is not initialized by the constructor

Depends on D132202

CID 1137652 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.
In nsPop3Protocol::nsPop3Protocol(nsIURI *): A scalar field is not initialized by the constructor.

Depends on D132204

CID 1137650 Uninitialized pointer field

The pointer field will point to an arbitrary memory location, any attempt to write may cause corruption.

In nsMsgBodyHandler::nsMsgBodyHandler(nsIMsgSearchScopeTerm *, unsigned int, nsIMsgDBHdr *, nsIMsgDatabase , char const, unsigned int, bool): A pointer field is not initialized in the constructor

Depends on D132205

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

Depends on D132209

CID 1137598 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.

In MsgViewSortColumnInfo::MsgViewSortColumnInfo(): A scalar field is not initialized by the constructor

Depends on D132210

Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/03e8242af7be Remove some unused members of nsMsgMailboxParser. r=mkmelin https://hg.mozilla.org/comm-central/rev/00f717697e19 Fix uninitialised members in nsMailboxProtocol. r=mkmelin
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/0295d55c1fde Fix uninitialised pointer in nsMsgBodyHander. r=mkmelin
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/67f1933ecb62 Fix uninitialised members in nsSpamSettings ctor. r=mkmelin https://hg.mozilla.org/comm-central/rev/4a1919cb9401 Fix uninitialised members in default MsgViewSortColumnInfo ctor. r=mkmelin
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/764049870678 Fix some uninitialised members in nsPop3Protocol ctor. r=mkmelin

CID 1494443 Resource leak

The system resource will not be reclaimed and reused, reducing the future availability of the resource.
In nsBayesianFilter::​classifyMessage(Tokenizer &, nsTSubstring<char> const &, nsTArray<unsigned int> &, nsTArray<unsigned int> &, nsIJunkMailClassificationListener *, nsIMsgTraitClassificationListener *, nsIMsgTraitDetailListener *): Leak of memory or pointers to system resources

CID 1137621 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.
In nsFolderCompactState::​nsFolderCompactState(): A scalar field is not initialized by the constructor

CID 1137588 Uninitialized pointer field

The pointer field will point to an arbitrary memory location, any attempt to write may cause corruption.
In nsMsgSearchDBView::​nsMsgSearchDBView(): A pointer field is not initialized in the constructor

CID 1137642 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.
In nsMsgSearchSession::​nsMsgSearchSession(): A scalar field is not initialized by the constructor

CID 1260160 Unused value

An assigned value that is never used may represent unnecessary computation, an incorrect algorithm, or possibly the need for cleanup or refactoring.
In EscapeFromSpaceLine(nsIOutputStream *, char , char const): A value assigned to a variable is never used

CID 1137486 Resource leak

The system resource will not be reclaimed and reused, reducing the future availability of the resource.
In nsLDAPURL::​Clone(nsIURI **): Leak of memory or pointers to system resources

CID 1417606 Logical vs. bitwise operator

The expression's value does not depend on the operands; inadvertent use of the wrong operator is a likely logic error.
In nsLDAPURL::​SetScheme(nsTSubstring<char> const &): Logical operator used in place of bitwise operator or vice versa

CID 1137571 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.
In nsMsgSendLater::​nsMsgSendLater(): A scalar field is not initialized by the constructor

CID 1137637 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.
In nsMsgCopy::​nsMsgCopy(): A scalar field is not initialized by the constructor

Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/f3a4e98a4177 fix resource leak in nsBayesianFilter::​classifyMessage. r=benc https://hg.mozilla.org/comm-central/rev/5172237e59b0 fix unitialized scalr field in nsFolderCompactState::​nsFolderCompactState. r=benc https://hg.mozilla.org/comm-central/rev/010970247a81 fix unitialized pointer field in nsMsgSearchDBView::​nsMsgSearchDBView. r=benc https://hg.mozilla.org/comm-central/rev/9dad42635030 fix unitialized scalar field in nsMsgSearchSession::​nsMsgSearchSession. r=benc https://hg.mozilla.org/comm-central/rev/62a3ef2a922a fix unchecked rv value in EscapeFromSpaceLine. r=benc https://hg.mozilla.org/comm-central/rev/bdd2b3ec5ff3 fix resource leak in nsLDAPURL::Clone(). r=benc https://hg.mozilla.org/comm-central/rev/d0b4bdf2ea55 fix wrong bitwise operator in nsLDAPURL::​SetScheme. r=benc https://hg.mozilla.org/comm-central/rev/ade791d89ef2 fix uninitialized scalar field in nsMsgSendLater::​nsMsgSendLater(). r=benc https://hg.mozilla.org/comm-central/rev/fda7e9a64a7d fix unitialized scalar field in nsMsgCopy::​nsMsgCopy(). r=benc

CID 749770 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.
In nsGNOMEShellService::​nsGNOMEShellService(): A scalar field is not initialized by the constructor

CID 1137577 Uninitialized pointer field

The pointer field will point to an arbitrary memory location, any attempt to write may cause corruption.
In nsMsgKeySetU::​nsMsgKeySetU(): A pointer field is not initialized in the constructor

CID 1260160 Unused value

An assigned value that is never used may represent unnecessary computation, an incorrect algorithm, or possibly the need for cleanup or refactoring.
In EscapeFromSpaceLine(nsIOutputStream *, char , char const): A value assigned to a variable is never used.

Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/9ca8c701a70f fix uninitialized scalar field in nsGNOMEShellService::​nsGNOMEShellService(). r=benc https://hg.mozilla.org/comm-central/rev/2643badf3866 fix unitialized pointer field in nsMsgKeySetU::​nsMsgKeySetU. r=benc https://hg.mozilla.org/comm-central/rev/6c483f165d4d fix unchecked rv in EscapeFromSpaceLine() r=benc

CID 1137580 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.
In nsMsgCompose::​nsMsgCompose(): A scalar field is not initialized by the constructor

CID 1362825 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.
In mozilla::​mailnews::​JaBaseCppUrl::​JaBaseCppUrl(): A scalar field is not initialized by the constructo

CID 1260155 Unused value

An assigned value that is never used may represent unnecessary computation, an incorrect algorithm, or possibly the need for cleanup or refactoring.
In nsImapMailFolder::​SyncFlags(nsIImapFlagAndUidState *): A value assigned to a variable is never used

CID 1260186 Unused value

An assigned value that is never used may represent unnecessary computation, an incorrect algorithm, or possibly the need for cleanup or refactoring.
In RecursiveCopy(nsIFile *, nsIFile *): A value assigned to a variable is never used.

Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/72684c293113 fix unused value in nsImapMailFolder::​SyncFlags(). r=benc
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/2027074d0e76 fix unused rv value in RecursiveCopy(). r=benc

CID 1137588 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.
In nsMsgSearchDBView::​nsMsgSearchDBView(): A scalar field is not initialized by the constructor

CID 1137581 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.
In nsMsgXFVirtualFolderDBView::​nsMsgXFVirtualFolderDBView(): A scalar field is not initialized by the constructor

Remove unused m_cachedFolderArrayIndex

CID 1137621 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.
In nsFolderCompactState::​nsFolderCompactState(): A scalar field is not initialized by the constructor

CID 1137633 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.
In nsMsgShutdownService::​nsMsgShutdownService(): A scalar field is not initialized by the constructor

CID 1137630 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.
In nsMsgDBFolder::​nsMsgDBFolder(): A scalar field is not initialized by the constructor

Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/fd942472ba65 fix unitialized scalar fields in nsMsgDBFolder::​nsMsgDBFolder(). r=benc
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/f4343f9281af fix unitialized scalar field in nsMsgShutdownService::​nsMsgShutdownService(). r=benc https://hg.mozilla.org/comm-central/rev/77a7fb898d2a fix Uninitialized scalar field in nsFolderCompactState::​nsFolderCompactState(). r=benc
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/8ab142a0af3b fix Uninitialized scalar field in nsMsgXFVirtualFolderDBView::​nsMsgXFVirtualFolderDBView(). r=benc https://hg.mozilla.org/comm-central/rev/adc6b578449c fix Uninitialized scalar field in nsMsgSearchDBView::​nsMsgSearchDBView(). r=benc
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/6875cdafa36e fix uninitialized scalar field in JaBaseCppUrl::​JaBaseCppUrl. r=benc
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/575bc9beeb5c fix uninitialized scalar field in nsMsgCompose::​nsMsgCompose(). r=benc

Not strictly needed - fields are initialised when the index operation kicks off,
but static analysis doesn't know that.

CID 1558793 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)12. uninit_member: Non-static class member mIsStupidlyLongLine is not initialized in this constructor nor in any functions that it calls.

Pushed by benc@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/b78ea0665464
Explicitly clear members in StoreIndexer ctor. r=leftmostcat

Going to close this and open new bug/s for additional work.

Status: REOPENED → RESOLVED
Closed: 5 years ago2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: