Closed Bug 1082114 Opened 5 years ago Closed 5 years ago

Fix pre-setData() calls to .available()

Categories

(Core :: Networking, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla36
Tracking Status
firefox35 --- fixed
firefox36 --- fixed

People

(Reporter: sfink, Assigned: sfink)

References

Details

Attachments

(1 file)

Bug 1061288 fetch the ArrayBuffer length to use for .available(), which crashes if there is no buffer yet set.
Blocks: 1061288
Attachment #8504234 - Flags: review?(jwalden+bmo)
Comment on attachment 8504234 [details] [diff] [review]
Fix pre-setData() calls to .available()

Review of attachment 8504234 [details] [diff] [review]:
-----------------------------------------------------------------

This should also be backported, of course.
Attachment #8504234 - Flags: review?(jwalden+bmo) → review+
I have a test in bug 991981 that, when landed, will somewhat incidentally test this.  So no need for a test here, I think.
Component: JavaScript Engine → Networking
https://hg.mozilla.org/mozilla-central/rev/4030d1c94b17
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Comment on attachment 8504234 [details] [diff] [review]
Fix pre-setData() calls to .available()

Approval Request Comment
[Feature/regressing bug #]: 1061288
[User impact if declined]: crash (null pointer deref) if abis.available() called early
[Describe test coverage new/current, TBPL]: on m-c for a day or two
[Risks and why]: low risk. Just an added null check.
[String/UUID change made/needed]: none
Attachment #8504234 - Flags: approval-mozilla-aurora?
Attachment #8504234 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.