nsTSubstring_CharT::Assign reports wrong OOM size

RESOLVED FIXED in mozilla36

Status

()

Core
XPCOM
--
critical
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: dmajor, Assigned: dmajor)

Tracking

36 Branch
mozilla36
x86
Windows NT
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
Some callers pass -1 to nsTSubstring_CharT::Assign to mean that the length is unknown and should be computed. If that allocation fails, we pass the -1 through to NS_ABORT_OOM. It leads to nonsense 4GB OOM annotations such as bp-e7959473-ebea-4c7d-9167-f32e52141110.
(Assignee)

Comment 1

3 years ago
Created attachment 8519701 [details] [diff] [review]
1096155
Assignee: nobody → dmajor
Attachment #8519701 - Flags: review?(nfroyd)
Comment on attachment 8519701 [details] [diff] [review]
1096155

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

Whoops!
Attachment #8519701 - Flags: review?(nfroyd) → review+
(Assignee)

Comment 3

3 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/b1c2305de473
https://hg.mozilla.org/mozilla-central/rev/b1c2305de473
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.