Closed Bug 1743637 Opened 2 years ago Closed 2 years ago

Fix array out of bounds in nsTextFrame::ToCString

Categories

(Core :: Layout: Text and Fonts, defect, P3)

defect

Tracking

()

RESOLVED FIXED
97 Branch
Tracking Status
firefox97 --- fixed

People

(Reporter: mikokm, Assigned: mikokm)

References

Details

Attachments

(1 file)

Noticed that this caused a crash when calling nsIFrame::GetFrameName() when running for example dom/tests/mochitest/dom-level1-core/test_hc_characterdatadeletedataexceedslength.html.

 0:46.91 GECKO(471795) GetContentLength(): 5, frag->GetLength(): 4
 0:46.91 GECKO(471795) Assertion failure: aIndex < mState.mLength (bad index), at /home/miko/Code/mu3/dom/base/nsTextFragment.h:219
Initializing stack-fixing for the first stack frame, this may take a while...
 1:01.89 GECKO(471795) #01: nsTextFragment::CharAt(unsigned int) const (/home/miko/Code/mu3/dom/base/nsTextFragment.h:219)
 1:01.89 GECKO(471795) #02: nsTextFrame::ToCString(nsTString<char>&, int*) const (/home/miko/Code/mu3/layout/generic/nsTextFrame.cpp:10263)
 1:01.90 GECKO(471795) #03: nsTextFrame::GetFrameName(nsTSubstring<char16_t>&) const (/home/miko/Code/mu3/layout/generic/nsTextFrame.cpp:10282)
Pushed by mikokm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/e86bd6c22ef7
Fix array out of bounds in nsTextFrame::ToCString r=emilio
Flags: needinfo?(mikokm)
Pushed by mikokm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/7af79a49bf5f
Fix array out of bounds in nsTextFrame::ToCString r=emilio
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
Backout by nerli@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8290bc0f4ceb
Backed out changeset 7af79a49bf5f for causing perma geckoview failures
Flags: needinfo?(mikokm)
Pushed by mikokm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/02d8ea288aad
Fix array out of bounds in nsTextFrame::ToCString r=emilio
Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: