Closed
Bug 1277604
Opened 8 years ago
Closed 8 years ago
(coverity) nsBayesianFilter.cpp : |mIframeToDiv| may not be initialized properly all the time.
Categories
(MailNews Core :: Filters, defect)
MailNews Core
Filters
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 50.0
People
(Reporter: ishikawa, Assigned: ishikawa)
References
(Blocks 1 open bug)
Details
(Keywords: coverity)
Attachments
(1 file)
(deleted),
patch
|
aceman
:
review+
|
Details | Diff | Splinter Review |
(Coverity static checker found this.)
In mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp,
|mIframeToDiv| may not be initialized properly all the time.
Other member variables are properly initialized in case they may not be defined in the profile.
We should do so for |mIframeToDiv|.
(Actually, the initialization is not done when earlier exit is taken, but even then I wonder why |mIframeToDiv| is not handled as other variables are in the initialization code.)
The patch follows.
Assignee | ||
Comment 1•8 years ago
|
||
I set |mIframeToDiv| to false which is the default value when it is not defined in profile.
(Like I said this initialization does not happen if the early exit is taken a few lines above. We better be ready for such unusual case. "Safety first programming" is important.)
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → ishikawa
Blocks: coverity-analysis
Updated•8 years ago
|
Component: OS Integration → Filters
Product: Thunderbird → MailNews Core
Comment on attachment 8759211 [details] [diff] [review]
Set |mIframeToDiv| to false in class object initialization code.
Review of attachment 8759211 [details] [diff] [review]:
-----------------------------------------------------------------
Looks reasonable to me. You mean the member is not initialized when any of the NS_ENSURE_SUCCESS_VOID fire, because after the GetBoolPref() we always initialize it to something.
Attachment #8759211 -
Flags: review+
Status: NEW → ASSIGNED
OS: Unspecified → All
Hardware: Unspecified → All
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 50.0
You need to log in
before you can comment on or make changes to this bug.
Description
•