Closed
Bug 1157669
Opened 8 years ago
Closed 8 years ago
Possible null pointer dereference in BasicLayerManager::PaintSelfOrChildren
Categories
(Core :: Graphics: Layers, defect)
Core
Graphics: Layers
Tracking
()
RESOLVED
FIXED
mozilla41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: nical, Assigned: amanda.sambath, Mentored)
References
(Blocks 1 open bug)
Details
(Keywords: coverity, Whiteboard: [CID 1244474])
Attachments
(1 file, 1 obsolete file)
2.45 KB,
patch
|
nical
:
review+
|
Details | Diff | Splinter Review |
https://hg.mozilla.org/mozilla-central/file/a5af73b32ac8/gfx/layers/basic/BasicLayerManager.cpp#l793 aGroupTarget can be null, and we have at least one branch depending on whether it is null before we call PaintSelfOrchildren here: https://hg.mozilla.org/mozilla-central/file/a5af73b32ac8/gfx/layers/basic/BasicLayerManager.cpp#l914 We should either * early-return if aGroupTarget is null. * MOZ_ASSERT that aGroupTarget is not null and fix the callers of PaintSelfOrChildren.
Assignee | ||
Comment 1•8 years ago
|
||
I would like to fix this bug.
Assignee | ||
Comment 2•8 years ago
|
||
Attachment #8608010 -
Flags: review?(nical.bugzilla)
Reporter | ||
Updated•8 years ago
|
Assignee: nobody → amanda.sambath
Reporter | ||
Comment 3•8 years ago
|
||
Comment on attachment 8608010 [details] [diff] [review] Build successful Review of attachment 8608010 [details] [diff] [review]: ----------------------------------------------------------------- Looks good, it'd be nice if you could add a MOZ_ASSERT(aTarget) at the top of BasicLayerManager::PaintLayer, to make it explicit that removing that branch, and the assertion in PaintSelfOrChildren hold because we expect PaintLayer to be called with a non-null target (an no need to add an assertion message for a simple null-check like this one). ::: gfx/layers/basic/BasicLayerManager.cpp @@ +792,5 @@ > void > BasicLayerManager::PaintSelfOrChildren(PaintLayerContext& aPaintContext, > gfxContext* aGroupTarget) > { > + MOZ_ASSERT(aGroupTarget, "aGroupTarget must not be null"); nit: no need to paraphrase the test if the comment doesn't add information. MOZ_ASSERT(aGroupTarget); will compile just fine.
Attachment #8608010 -
Flags: feedback+
Assignee | ||
Comment 4•8 years ago
|
||
Attachment #8608010 -
Attachment is obsolete: true
Attachment #8608010 -
Flags: review?(nical.bugzilla)
Attachment #8608706 -
Flags: review?(nical.bugzilla)
Reporter | ||
Updated•8 years ago
|
Attachment #8608706 -
Flags: review?(nical.bugzilla) → review+
Reporter | ||
Comment 5•8 years ago
|
||
try push https://treeherder.mozilla.org/#/jobs?repo=try&revision=cdc245885097
Assignee | ||
Updated•8 years ago
|
Keywords: coverity → checkin-needed
![]() |
||
Comment 7•8 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/fd77898fed81
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox41:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Updated•5 years ago
|
Blocks: coverity-analysis
You need to log in
before you can comment on or make changes to this bug.
Description
•