Commit 3b2fd75c authored by antti's avatar antti
Browse files

LayoutTests:

        Reviewed by Alexey.
        
        Test for DOS using composed character.

        * fast/text/large-text-composed-char-dos-expected.txt: Added.
        * fast/text/large-text-composed-char-dos.html: Added.

WebCore:

        Reviewed by Alexey.

        Alexey spotted a DOS by using string of 64k unbreakable character in
        fix for http://bugs.webkit.org/show_bug.cgi?id=12833

        * dom/Text.cpp:
        (WebCore::Text::createWithLengthLimit):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20146 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent aec8187f
2007-03-13 Antti Koivisto <antti@apple.com>
Reviewed by Alexey.
Test for DOS using composed character.
* fast/text/large-text-composed-char-dos-expected.txt: Added.
* fast/text/large-text-composed-char-dos.html: Added.
2007-03-13 David Kilzer <ddkilzer@kilzer.net>
 
Reviewed by Tim H.
This source diff could not be displayed because it is too large. You can view the blob instead.
2007-03-13 Antti Koivisto <antti@apple.com>
Reviewed by Alexey.
Alexey spotted a DOS by using string of 64k unbreakable character in
fix for http://bugs.webkit.org/show_bug.cgi?id=12833
* dom/Text.cpp:
(WebCore::Text::createWithLengthLimit):
2007-03-13 Lars Knoll <lars@trolltech.com>
 
Fix the Qt build
......
......@@ -212,6 +212,10 @@ PassRefPtr<Text> Text::createWithLengthLimit(Document* doc, const String& text,
if (end < text.length() && !isTextBreak(it, end))
end = textBreakPreceding(it, end);
// maxChars of unbreakable characters could lead to infinite loop
if (end <= start)
end = text.length();
String nodeText = text.substring(start, end - start);
charsLeft = text.length() - end;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment