Open Bug 1361580 Opened 3 years ago Updated 3 years ago

coverity report: ​nsContinuingTextFrame::mPrevContinuation isn't initialized properly


(Core :: Layout: Text and Fonts, defect, P3)

53 Branch




(Reporter: mats, Unassigned)


(Blocks 1 open bug, )


(Keywords: coverity, regression, Whiteboard: [CID 750303])

Filing this as security sensitive just in case...

Coverity CID 750303 Uninitialized pointer field

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

In nsContinuingTextFrame::​nsContinuingTextFrame(nsStyleContext *): A pointer field is not initialized in the constructor 

4355  explicit nsContinuingTextFrame(nsStyleContext* aContext)
4356    : nsTextFrame(aContext)
    CID 750303 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)2. uninit_member: Non-static class member mPrevContinuation is not initialized in this constructor nor in any functions that it calls.
4357  {}
    1. member_decl: Class member declaration for mPrevContinuation.
4359  nsTextFrame* mPrevContinuation;
Actually, there's only one path that create nsContinuingTextFrame:
and we always call Init there with a non-null aPrevInFlow (aFrame):

Still, it's probably worth adding a mPrevContinuation(nullptr) there.
It seems I can no longer remove the core-security flag.

Dan, can you make this bug public please?
Flags: needinfo?(dveditz)
Group: core-security
Flags: needinfo?(dveditz)
Whiteboard: [CID 750303]
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.