Closed Bug 1551984 Opened 5 years ago Closed 5 years ago

NS_ConsumeStream should use CheckedInt for its length calculations and do fallible allocations

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Details

Attachments

(1 file)

Right now it's using some manual math to decide whether it can add two numbers, and doing infallible allocations (which it then checks for failure, sorta!).

Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e6d06a5ffa07
Improve OOM and overflow handling in NS_ConsumeStream.  r=froydnj
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Assignee: nobody → bzbarsky
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: