Closed Bug 1448208 Opened 7 years ago Closed 7 years ago

Overflow check in nsWindowWatcher relies on undefined behavior

Categories

(Core :: DOM: Core & HTML, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: away, Assigned: away)

References

Details

Attachments

(1 file)

clang-cl builds fail the mochitest added in bug 978847 because the compiler assumes this signed integer operation can't overflow: https://searchfox.org/mozilla-central/rev/c217fbde244344fedfd07b57a740c694a456dbca/toolkit/components/windowwatcher/nsWindowWatcher.cpp#2428
Blocks: 1447727
Attached patch checkedIntSplinter Review
Assignee: nobody → dmajor
Attachment #8961622 - Flags: review?(nfroyd)
Priority: -- → P2
Blocks: 1423667
Comment on attachment 8961622 [details] [diff] [review] checkedInt Review of attachment 8961622 [details] [diff] [review]: ----------------------------------------------------------------- More CheckedInt usage is always a good thing.
Attachment #8961622 - Flags: review?(nfroyd) → review+
Pushed by dmajor@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/4db836a8d12b Use CheckedInt for overflow check in nsWindowWatcher::SizeOpenedWindow. r=froydnj
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: