Closed Bug 1366996 Opened 2 years ago Closed 2 years ago

Coverity report: Uninitialized members (UNINIT_CTOR) in nsUrlClassifierInfo

Categories

(Toolkit :: Safe Browsing, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: tnguyen, Assigned: dimi)

Details

(Whiteboard: #sbv4-m7)

Attachments

(1 file)

** CID 1409773:  Uninitialized members  (UNINIT_CTOR)
/toolkit/components/url-classifier/nsUrlClassifierInfo.cpp: 12 in nsUrlClassifierPositiveCacheEntry::nsUrlClassifierPositiveCacheEntry()()


________________________________________________________________________________________________________
*** CID 1409773:  Uninitialized members  (UNINIT_CTOR)
/toolkit/components/url-classifier/nsUrlClassifierInfo.cpp: 12 in nsUrlClassifierPositiveCacheEntry::nsUrlClassifierPositiveCacheEntry()()
6
7     NS_IMPL_ISUPPORTS(nsUrlClassifierPositiveCacheEntry,
8                       nsIUrlClassifierPositiveCacheEntry)
9
10     nsUrlClassifierPositiveCacheEntry::nsUrlClassifierPositiveCacheEntry()
11     {
>>>     CID 1409773:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "expirySec" is not initialized in this constructor nor in any functions that it calls.
12     }
13
14     NS_IMETHODIMP
15     nsUrlClassifierPositiveCacheEntry::GetExpiry(int64_t* aExpiry)
16     {
17       if (!aExpiry) {

** CID 1409774:  Uninitialized members  (UNINIT_CTOR)
/toolkit/components/url-classifier/nsUrlClassifierInfo.cpp: 37 in nsUrlClassifierCacheEntry::nsUrlClassifierCacheEntry()()


________________________________________________________________________________________________________
*** CID 1409774:  Uninitialized members  (UNINIT_CTOR)
/toolkit/components/url-classifier/nsUrlClassifierInfo.cpp: 37 in nsUrlClassifierCacheEntry::nsUrlClassifierCacheEntry()()
31
32     NS_IMPL_ISUPPORTS(nsUrlClassifierCacheEntry,
33                       nsIUrlClassifierCacheEntry)
34
35     nsUrlClassifierCacheEntry::nsUrlClassifierCacheEntry()
36     {
>>>     CID 1409774:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "expirySec" is not initialized in this constructor nor in any functions that it calls.
37     }
38
39     NS_IMETHODIMP
40     nsUrlClassifierCacheEntry::GetPrefix(nsACString& aPrefix)
41     {
42       aPrefix = prefix;
Priority: -- → P2
Whiteboard: #sbv4-m7
Assignee: nobody → dlee
Status: NEW → ASSIGNED
Comment on attachment 8872847 [details]
Bug 1366996 - Fix uninitialized members in nsUrlClassifierInfo.

https://reviewboard.mozilla.org/r/144356/#review148158

::: commit-message-fbe0e:3
(Diff revision 1)
> +Bug 1366996 - Fix uninitialized members in nsUrlClassifierInfo. r?francois
> +
> +This is found by Coverity Scan (CID 1409773, 1409774).

"was found"
Attachment #8872847 - Flags: review?(francois) → review+
Pushed by dlee@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/849d721f9173
Fix uninitialized members in nsUrlClassifierInfo. r=francois
https://hg.mozilla.org/mozilla-central/rev/849d721f9173
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.