Closed Bug 1361589 Opened 7 years ago Closed 7 years ago

Coverity report: nsMathMLmencloseFrame::mRuleThickness/mRadicalRuleThickness is not initialized in this constructor nor in any functions that it calls

Categories

(Core :: MathML, defect, P4)

53 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox-esr52 --- unaffected
firefox53 --- wontfix
firefox54 --- wontfix
firefox55 --- fixed

People

(Reporter: MatsPalmgren_bugz, Assigned: fredw)

References

(Blocks 1 open bug, )

Details

(Keywords: coverity, good-first-bug, regression, Whiteboard: [CID 750310])

Attachments

(1 file)

Coverity CID 750310 Uninitialized scalar field

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

In nsMathMLmencloseFrame::​nsMathMLmencloseFrame(nsStyleContext *): A scalar field is not initialized by the constructor


 50nsMathMLmencloseFrame::nsMathMLmencloseFrame(nsStyleContext* aContext) :
 51  nsMathMLContainerFrame(aContext), mNotationsToDraw(0),
 52  mLongDivCharIndex(-1), mRadicalCharIndex(-1), mContentWidth(0)
 53{
   2. uninit_member: Non-static class member mRuleThickness is not initialized in this constructor nor in any functions that it calls.
   CID 750310 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)4. uninit_member: Non-static class member mRadicalRuleThickness is not initialized in this constructor nor in any functions that it calls.
 54}
It looks like we initialize these during reflow and then use them during paint
so it's probably OK.  I think we should initialize them to zero in the ctor anyway.
Keywords: good-first-bug
Whiteboard: [CID 750310]
Attached patch PatchSplinter Review
Assignee: nobody → fred.wang
Status: NEW → ASSIGNED
Attachment #8865114 - Flags: review?(karlt)
Attachment #8865114 - Flags: review?(mats) → review+
Keywords: checkin-needed
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/fc5f257ad83b
Coverity report: nsMathMLmencloseFrame::mRuleThickness/mRadicalRuleThickness is not initialized in this constructor nor in any functions that it calls. r=karlt
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/fc5f257ad83b
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: