WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
103139
[ENCHANT] Infinite loop when end word position is not found
https://bugs.webkit.org/show_bug.cgi?id=103139
Summary
[ENCHANT] Infinite loop when end word position is not found
Carlos Garcia Campos
Reported
2012-11-23 06:46:54 PST
The problem is that in TextCheckerEnchant::checkSpellingOfString() the inner loop that looks for the end of the word doesn't break when end > numberOfCharacters.
Attachments
Patch
(7.89 KB, patch)
2012-11-23 06:51 PST
,
Carlos Garcia Campos
mrobinson
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Carlos Garcia Campos
Comment 1
2012-11-23 06:51:48 PST
Created
attachment 175799
[details]
Patch We could just fix the infinite loop by adding the check to break the inner loop, but the code can be optimized and simplified a lot using the word iterator to iterate the words and it also fixes the infinite loop.
Martin Robinson
Comment 2
2012-11-23 07:59:00 PST
Comment on
attachment 175799
[details]
Patch Great. As long as tests pass this look like an incredible improvement.
Martin Robinson
Comment 3
2012-11-23 08:00:59 PST
You might want to double-check this patch before landing. At some point it seemed that the TextIterators did not support nested iterators. Perhaps that's been changed in WebCore though. This is an issue because the spell checker is called while walking through a text iterator at some points.
Carlos Garcia Campos
Comment 4
2012-11-23 08:41:25 PST
Committed
r135618
: <
http://trac.webkit.org/changeset/135618
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug