Closed
Bug 1117594
Opened 8 years ago
Closed 8 years ago
|technique| can be used when uninitialized in ImageLayerD3D10::RenderLayer()
Categories
(Core :: Graphics: Layers, defect)
Tracking
()
RESOLVED
FIXED
mozilla37
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
Details
Attachments
(1 file)
1.23 KB,
patch
|
bas.schouten
:
review+
|
Details | Diff | Splinter Review |
cppcheck reports this:
> gfx/layers/d3d10/ImageLayerD3D10.cpp:313: error: Uninitialized variable: technique
If image->GetFormat() is one of CAIRO_SURFACE, D3D9_RGB32_TEXTURE or PLANAR_YCBCR then |technique| will be initialized. Otherwise, it won't be.
I see two possibilities:
- This is a real defect.
- This is not a real defect because the three above are the only possible values. If so, it would be good to add an |else| branch that crashes, or something like that, to make things clearer. Especially given that this is a large function with complex control flow.
I've marked this bug as security-sensitive to be cautious, but that may be overkill.
Comment 2•8 years ago
|
||
(In reply to Nicholas Nethercote [:njn] from comment #1) > bas, what do you think? Is it a real defect? Off the top of my head these are the only possible options. But it would probably be good to assert this or even as you suggested MOZ_CRASH. Especially in case someone changes this in the future.
Flags: needinfo?(bas)
![]() |
Assignee | |
Comment 3•8 years ago
|
||
Attachment #8543742 -
Flags: review?(bas)
![]() |
Assignee | |
Updated•8 years ago
|
Assignee: nobody → n.nethercote
Status: NEW → ASSIGNED
![]() |
Assignee | |
Comment 4•8 years ago
|
||
This bug probably doesn't need the s-s tag any more, but I don't have permission to remove it.
Updated•8 years ago
|
Group: core-security
Updated•8 years ago
|
Attachment #8543742 -
Flags: review?(bas) → review+
![]() |
Assignee | |
Comment 5•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/03a624fda816
Comment 6•8 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/03a624fda816
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in
before you can comment on or make changes to this bug.
Description
•