expandToParagraphBoundary() returns invalid ranges |
||
Issue descriptionThere are several ClusterFuzz bugs that are caused by static function |expandToParagraphBoundary()| in TextCheckingParagraph.cpp, where the function tries to return an invalid range with start position beyond the end position.
,
Aug 24 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8d1974aecc77d407a9ee89d2434f0079b4cc1e40 commit 8d1974aecc77d407a9ee89d2434f0079b4cc1e40 Author: xiaochengh <xiaochengh@chromium.org> Date: Wed Aug 24 02:15:54 2016 Force expandToParagraphBoundary to return a valid EphemeralRange This is a first-aid patch that make expandToParagraphBoundary() compare the paragraph boundaries found with the input range before returning, so that the returned range is always a super-range of the input range, and hence, a valid EphemeralRange. This patch does not fix the root cause of the bugs, as we: - do not expect startOfParagraph()'s return value to be beyond that of endOfParagraph()'s, and - are planning of getting rid of TextCheckingParagraph, the only client of expandToParagraphBoundary(), ultimately BUG= 639521 , 639801 , 640022 , 640030 , 640112 TEST=n/a; this is a first-aid patch Review-Url: https://codereview.chromium.org/2271603002 Cr-Commit-Position: refs/heads/master@{#413942} [modify] https://crrev.com/8d1974aecc77d407a9ee89d2434f0079b4cc1e40/third_party/WebKit/Source/core/editing/spellcheck/TextCheckingParagraph.cpp
,
Sep 2 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by xiaoche...@chromium.org
, Aug 23 2016