[webkit-reviews] review granted: [Bug 133659] iOS WebKit: Crash in charactersAroundPosition : [Attachment 232737] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 9 15:21:14 PDT 2014

Benjamin Poulain <benjamin at webkit.org> has granted Enrica Casucci
<enrica at apple.com>'s request for review:
Bug 133659: iOS WebKit: Crash in charactersAroundPosition

Attachment 232737: Patch

------- Additional Comments from Benjamin Poulain <benjamin at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=232737&action=review

> Source/WebCore/editing/VisibleUnits.cpp:1843
> +	       if (index >= maxCharacters)
> +		   break;

Shouldn't this be after "characters[index++] = characterString[i];".

You may want to change the for() loop into a while loop. Having a for() loop
that breaks into the flow  tends to add complexity.

More information about the webkit-reviews mailing list