Closed Bug 189723 Opened 22 years ago Closed 22 years ago

[valgrind] Use of uninitialized value in nsCSSRendering::FillPolygon

Categories

(Core :: CSS Parsing and Computation, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: roc, Assigned: roc)

References

Details

(Keywords: valgrind, Whiteboard: [fix])

Attachments

(1 file, 1 obsolete file)

Debugging code in FillPolygon calls GetPenMode to check the pen mode. Only Windows implements that function, and on other platforms FillPolygon ignores the error return and tests the pen mode (which is garbage). Trivial patch follows.
Comment on attachment 112000 [details] [diff] [review] fix trivial patch for you to review, bz
Attachment #112000 - Flags: superreview?(bzbarsky)
Attachment #112000 - Flags: review?(bzbarsky)
Sorry, Robert, I think you should also remove previous line: aContext.GetPenMode(penMode); - if (penMode == nsPenMode_kInvert) { + if (NS_SUCCEEDED(aContext.GetPenMode(penMode)) && penMode == nsPenMode_kInvert) See, aContext.GetPenMode(penMode) calling two time.
Attached patch fixSplinter Review
Attachment #112000 - Attachment is obsolete: true
Comment on attachment 112002 [details] [diff] [review] fix better trivial patch :-)
Attachment #112002 - Flags: superreview?(bzbarsky)
Attachment #112002 - Flags: review?(bzbarsky)
Attachment #112000 - Flags: superreview?(bzbarsky)
Attachment #112000 - Flags: review?(bzbarsky)
Comment on attachment 112002 [details] [diff] [review] fix Put the "&&" on the first line, please, not the second one.
Attachment #112002 - Flags: superreview?(bzbarsky)
Attachment #112002 - Flags: superreview+
Attachment #112002 - Flags: review?(bzbarsky)
Attachment #112002 - Flags: review+
*** Bug 190645 has been marked as a duplicate of this bug. ***
Fix checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Keywords: valgrind
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: