Closed Bug 51088 Opened 25 years ago Closed 25 years ago

"Rewrap" hits infinite nsAReadableString assert loop

Categories

(Core :: DOM: Editor, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: akkzilla, Assigned: akkzilla)

Details

(Keywords: crash)

Send yourself a message with long lines, by turning off "wrap long lines" then typing some very long lines. Read the message in mozilla, reply to it, highlight the lines, and do "Rewrap". You hit one of those infinite assert loops: ###!!! ASSERTION: Infinite loop: can't advance a readable iterator beyond the end of a string: 'one_hop>0', file ../../dist/include/nsAReadableString.h, line 209
Requesting nsbeta3 since it's a crash (well, a hang, which is essentially the same thing).
Status: NEW → ASSIGNED
Keywords: crash, nsbeta3
Here's the fix. Very safe. < while (aOutString[i] == '\r' || aOutString[i] == '\n') --- > while (i < length && (aInString[i] == '\r' || aInString[i] == '\n'))
Whiteboard: TRIVIAL FIX IN HAND
That looks like the right fix to me. r=scc if you need it.
Fixed (checked in in conjunction with a related mail/news bug).
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Whiteboard: TRIVIAL FIX IN HAND
Target Milestone: --- → M18
verified in 9/12 build.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.