Closed
Bug 577224
Opened 14 years ago
Closed 13 years ago
nsCARenderer::DrawSurfaceToCGContext comparison between signed and unsigned integer expressions
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla7
People
(Reporter: timeless, Assigned: BenWa)
Details
Attachments
(1 file, 4 obsolete files)
3.68 KB,
patch
|
Details | Diff | Splinter Review |
gfx/src/thebes/utils/nsCoreAnimationSupport.mm: In static member function ‘static nsresult nsCARenderer::DrawSurfaceToCGContext(CGContext*, nsIOSurface*, CGColorSpace*, int, int, int, int)’: 695: warning: comparison between signed and unsigned integer expressions 697: warning: comparison between signed and unsigned integer expressions
Attachment #456244 -
Flags: review?(joshmoz) → review?(b56girard)
Assignee | ||
Comment 2•14 years ago
|
||
Comment on attachment 456244 [details] [diff] [review] patch Thanks!
Attachment #456244 -
Flags: review?(b56girard) → review+
http://hg.mozilla.org/mozilla-central/rev/06cc16f7954e
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Backed out because this can cause plugins to not draw. http://hg.mozilla.org/mozilla-central/rev/330178c7235b
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #456244 -
Attachment is obsolete: true
Assignee | ||
Comment 5•14 years ago
|
||
Attachment #457725 -
Flags: review?
Assignee | ||
Updated•14 years ago
|
Attachment #457725 -
Flags: review? → review?(timeless)
Assignee | ||
Comment 6•14 years ago
|
||
Comment on attachment 457725 [details] [diff] [review] Change size_t to int Changed the data type. The first proposed patch caused underflow.
Attachment #457725 -
Flags: review?(timeless) → review?(joshmoz)
Comment on attachment 457725 [details] [diff] [review] Change size_t to int I don't think that is the right thing to do. You're assigning size_t to a signed int and then passing it off later as size_t, without knowing exactly what size_t is. You could do something like "(aWidth > int(ioWidth - aX))" but it might be better to sanitize, make sure that ioWidth and ioHeight aren't too big for a signed int and that "aX <= ioWidth" (same for height).
Attachment #457725 -
Flags: review?(joshmoz) → review-
Assignee | ||
Comment 8•13 years ago
|
||
Attachment #457725 -
Attachment is obsolete: true
Attachment #539838 -
Flags: review?(smichaud)
Comment 9•13 years ago
|
||
Comment on attachment 539838 [details] [diff] [review] int->size_t, reworked inequality This basically looks fine to me. But do we also need to check that the values of aX and aY are sane (that they're both positive, and that aX < ioWidth and aY < ioHeight)?
Assignee | ||
Comment 10•13 years ago
|
||
Attachment #539838 -
Attachment is obsolete: true
Attachment #541675 -
Flags: review?(smichaud)
Attachment #539838 -
Flags: review?(smichaud)
Updated•13 years ago
|
Attachment #541675 -
Flags: review?(smichaud) → review+
Assignee | ||
Updated•13 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 11•13 years ago
|
||
Added commit message
Attachment #541675 -
Attachment is obsolete: true
Comment 12•13 years ago
|
||
http://hg.mozilla.org/integration/mozilla-inbound/rev/1cb1bf67357e
Status: REOPENED → ASSIGNED
Flags: in-testsuite-
Keywords: checkin-needed
Whiteboard: [inbound]
Target Milestone: --- → mozilla7
Comment 13•13 years ago
|
||
Merged: http://hg.mozilla.org/mozilla-central/rev/1cb1bf67357e
Status: ASSIGNED → RESOLVED
Closed: 14 years ago → 13 years ago
Hardware: x86 → All
Resolution: --- → FIXED
Whiteboard: [inbound]
Comment 14•13 years ago
|
||
Verified that the following files are updated in mozilla-central repository: gfx/thebes/nsCoreAnimationSupport.h gfx/thebes/nsCoreAnimationSupport.mm Is this enough to verify the fix and mark the bug accordingly? Thank you!
You need to log in
before you can comment on or make changes to this bug.
Description
•