fix a few code issues found by coverity
Categories
(MailNews Core :: General, defect)
Tracking
(thunderbird_esr78 wontfix, thunderbird82 wontfix, thunderbird_esr115 unaffected)
| 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 | |
|
Bug 1668926 - coverity - fix Uninitialized scalar field in nsMsgGroupView::nsMsgGroupView(). r=benc
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.
| Assignee | ||
Comment 1•5 years ago
|
||
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 2•5 years ago
|
||
| Assignee | ||
Comment 3•5 years ago
|
||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 4•5 years ago
|
||
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
| Assignee | ||
Comment 6•5 years ago
|
||
(Basically code clean-up, not worth uplifting.)
| Assignee | ||
Comment 7•5 years ago
|
||
Going to add a few more cases here.
| Assignee | ||
Comment 8•5 years ago
|
||
| Assignee | ||
Comment 9•5 years ago
|
||
| Assignee | ||
Comment 10•5 years ago
|
||
Comment 11•5 years ago
|
||
Comment 12•5 years ago
|
||
Updated•5 years ago
|
| Assignee | ||
Updated•5 years ago
|
Comment 13•5 years ago
|
||
| Assignee | ||
Comment 14•5 years ago
|
||
(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.
Comment 15•5 years ago
|
||
(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.
| Assignee | ||
Comment 16•5 years ago
|
||
Comment 17•5 years ago
|
||
Comment 18•5 years ago
|
||
| Assignee | ||
Comment 19•4 years ago
|
||
Found by coverity. leaked_storage: Variable newFileStream going out of scope leaks the storage it points to.
CID 1137477
Depends on D111541
Comment 20•4 years ago
|
||
| Assignee | ||
Comment 21•4 years ago
|
||
CID 1260149 (#1 of 1): Resource leak (RESOURCE_LEAK)50. leaked_storage: Variable newTerm going out of scope leaks the storage it points to
| Assignee | ||
Comment 22•4 years ago
|
||
CID 451007 (#1 of 1): Uninitialized scalar variable (UNINIT)6. uninit_use: Using uninitialized value newFlags.
Depends on D111611
| Assignee | ||
Comment 23•4 years ago
|
||
CID 450452 (#1 of 1): Uninitialized scalar variable (UNINIT)5. uninit_use: Using uninitialized value flagOperation
Depends on D111612
| Assignee | ||
Comment 24•4 years ago
|
||
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
| Assignee | ||
Comment 25•4 years ago
|
||
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
| Assignee | ||
Comment 26•4 years ago
|
||
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
| Assignee | ||
Comment 27•4 years ago
|
||
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
| Assignee | ||
Comment 28•4 years ago
|
||
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
| Assignee | ||
Comment 29•4 years ago
|
||
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
| Assignee | ||
Comment 30•4 years ago
|
||
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
| Assignee | ||
Comment 31•4 years ago
|
||
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
| Assignee | ||
Comment 32•4 years ago
|
||
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
| Assignee | ||
Comment 33•4 years ago
|
||
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
| Assignee | ||
Comment 34•4 years ago
|
||
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
Comment 35•4 years ago
|
||
Comment 36•4 years ago
|
||
Comment 37•4 years ago
|
||
Comment 38•4 years ago
|
||
| Assignee | ||
Comment 39•4 years ago
|
||
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
| Assignee | ||
Comment 40•4 years ago
|
||
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.
| Assignee | ||
Comment 41•4 years ago
|
||
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.
| Assignee | ||
Comment 42•4 years ago
|
||
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.
| Assignee | ||
Comment 43•4 years ago
|
||
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.
| Assignee | ||
Comment 44•4 years ago
|
||
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.
| Assignee | ||
Comment 45•4 years ago
|
||
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.
| Assignee | ||
Comment 46•4 years ago
|
||
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.
Comment 47•4 years ago
|
||
| Assignee | ||
Comment 48•4 years ago
|
||
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
| Assignee | ||
Comment 49•4 years ago
|
||
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
| Assignee | ||
Comment 50•4 years ago
|
||
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
| Assignee | ||
Comment 51•4 years ago
|
||
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
| Assignee | ||
Comment 52•4 years ago
|
||
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
| Assignee | ||
Comment 53•4 years ago
|
||
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
| Assignee | ||
Comment 54•4 years ago
|
||
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
Comment 55•4 years ago
|
||
Comment 56•4 years ago
|
||
Pulsebot appears to be on holiday.
https://hg.mozilla.org/comm-central/rev/16e88118823282f37582ac41933d8980466ed6ed
https://hg.mozilla.org/comm-central/rev/523476bdb098a7a62e349fda0e1b61b41eee23b8
https://hg.mozilla.org/comm-central/rev/09c4038e103f3ffdc5c5f3f2a149f1ad0a38cc79
https://hg.mozilla.org/comm-central/rev/13926997858cf2d8b4813a67192b92bdbf787a5e
https://hg.mozilla.org/comm-central/rev/747b5c9c5f99849022f3101f22b1f3c2fe606bba
https://hg.mozilla.org/comm-central/rev/3ce47bea0b6d88b76b169d1ff6f2405c3233aebf
https://hg.mozilla.org/comm-central/rev/9c43ad00647714ff5942176a81e3ba3034e11cab
Comment 57•4 years ago
|
||
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
Comment 58•4 years ago
|
||
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
Comment 59•4 years ago
|
||
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
Updated•4 years ago
|
Comment 60•4 years ago
|
||
| bugherder | ||
Updated•4 years ago
|
Comment 61•4 years ago
|
||
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
Comment 62•4 years ago
|
||
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
Comment 63•4 years ago
|
||
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
Comment 64•4 years ago
|
||
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
Comment 65•4 years ago
|
||
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
Comment 66•4 years ago
|
||
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
Comment 67•4 years ago
|
||
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
Comment 68•4 years ago
|
||
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
Comment 69•4 years ago
|
||
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
Comment 70•4 years ago
|
||
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
Comment 71•4 years ago
|
||
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
Updated•4 years ago
|
Comment 72•4 years ago
|
||
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
Comment 73•4 years ago
|
||
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-revshould 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?somebodysyntax, 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.)
Comment 74•4 years ago
|
||
Comment 75•4 years ago
|
||
(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-revshould 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?somebodysyntax, 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.
Comment 76•4 years ago
|
||
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.
Comment 77•4 years ago
|
||
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
Updated•4 years ago
|
Comment 78•4 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/6101012f0de3
Fix overlapping buffer in memory copy in nsImapNamespaceList::AllocateCanonicalFolderName(). r=mkmelin
Updated•4 years ago
|
| Assignee | ||
Comment 79•4 years ago
|
||
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.
| Assignee | ||
Comment 80•4 years ago
|
||
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.
| Assignee | ||
Comment 81•4 years ago
|
||
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.
| Assignee | ||
Comment 82•4 years ago
|
||
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.
| Assignee | ||
Comment 83•4 years ago
|
||
| Assignee | ||
Comment 84•4 years ago
|
||
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.
| Assignee | ||
Comment 85•4 years ago
|
||
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
Comment 86•4 years ago
|
||
| Assignee | ||
Comment 87•4 years ago
|
||
CID 1137394 Explicit null dereferenced
A null pointer dereference will occur.
In nsParseMailMessageState::nsParseMailMessageState(): Dereference of an explicit null value
| Assignee | ||
Comment 88•4 years ago
|
||
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
| Assignee | ||
Comment 89•4 years ago
|
||
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
| Assignee | ||
Comment 90•4 years ago
|
||
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
Comment 91•4 years ago
|
||
Comment 92•4 years ago
|
||
| Assignee | ||
Comment 93•4 years ago
|
||
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)
| Assignee | ||
Comment 94•4 years ago
|
||
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.
| Assignee | ||
Comment 95•4 years ago
|
||
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.
| Assignee | ||
Comment 96•4 years ago
|
||
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
| Assignee | ||
Comment 97•4 years ago
|
||
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.
| Assignee | ||
Comment 98•4 years ago
|
||
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
| Assignee | ||
Comment 99•4 years ago
|
||
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.
| Assignee | ||
Comment 100•4 years ago
|
||
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
| Assignee | ||
Comment 101•4 years ago
|
||
CID 450202 Logically dead code
dead_error_condition: The condition startOfAttribute must be true.
| Assignee | ||
Comment 102•4 years ago
|
||
CID 1137379 Logically dead code
notnull: At condition currentPath, the value of currentPath cannot be nullptr.
| Assignee | ||
Comment 103•4 years ago
|
||
CID 1137394 Explicit null dereferenced
A null pointer dereference will occur.
In nsParseMailMessageState::nsParseMailMessageState(): Dereference of an explicit null value
Comment 104•4 years ago
|
||
Comment 105•4 years ago
|
||
| Assignee | ||
Comment 106•4 years ago
|
||
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
| Assignee | ||
Comment 107•4 years ago
|
||
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
| Assignee | ||
Comment 108•4 years ago
|
||
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
Comment 109•4 years ago
|
||
Comment 110•4 years ago
|
||
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)
Comment 111•4 years ago
|
||
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
Comment 112•4 years ago
|
||
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
Comment 113•4 years ago
|
||
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
Comment 114•4 years ago
|
||
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
Comment 115•4 years ago
|
||
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
Comment 116•4 years ago
|
||
Comment 117•4 years ago
|
||
Comment 118•4 years ago
|
||
Comment 119•4 years ago
|
||
| Assignee | ||
Comment 120•4 years ago
|
||
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
| Assignee | ||
Comment 121•4 years ago
|
||
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
| Assignee | ||
Comment 122•4 years ago
|
||
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
| Assignee | ||
Comment 123•4 years ago
|
||
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
| Assignee | ||
Comment 124•4 years ago
|
||
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
| Assignee | ||
Comment 125•4 years ago
|
||
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
| Assignee | ||
Comment 126•4 years ago
|
||
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
| Assignee | ||
Comment 127•4 years ago
|
||
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
| Assignee | ||
Comment 128•4 years ago
|
||
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
Comment 129•4 years ago
|
||
| Assignee | ||
Comment 130•4 years ago
|
||
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
| Assignee | ||
Comment 131•4 years ago
|
||
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
| Assignee | ||
Comment 132•4 years ago
|
||
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.
Comment 133•4 years ago
|
||
| Assignee | ||
Comment 134•4 years ago
|
||
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
| Assignee | ||
Comment 135•4 years ago
|
||
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
| Assignee | ||
Comment 136•4 years ago
|
||
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
| Assignee | ||
Comment 137•4 years ago
|
||
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.
Comment 138•4 years ago
|
||
Comment 139•4 years ago
|
||
| Assignee | ||
Comment 140•4 years ago
|
||
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
| Assignee | ||
Comment 141•4 years ago
|
||
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
| Assignee | ||
Comment 142•4 years ago
|
||
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
| Assignee | ||
Comment 143•4 years ago
|
||
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
| Assignee | ||
Comment 144•4 years ago
|
||
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
Comment 145•4 years ago
|
||
Comment 146•4 years ago
|
||
Comment 147•4 years ago
|
||
Comment 148•4 years ago
|
||
Comment 149•4 years ago
|
||
Comment 150•2 years ago
|
||
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.
Updated•2 years ago
|
Comment 151•2 years ago
|
||
Pushed by benc@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/b78ea0665464
Explicitly clear members in StoreIndexer ctor. r=leftmostcat
| Assignee | ||
Comment 152•2 years ago
|
||
Going to close this and open new bug/s for additional work.
Description
•