[Webkit-unassigned] [Bug 47397] New: TextResourceDecoder::checkForHeadCharset can look way past the limit.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 7 20:36:22 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=47397

           Summary: TextResourceDecoder::checkForHeadCharset can look way
                    past the limit.
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Page Loading
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: dimich at chromium.org
                CC: ap at webkit.org


TextResourceDecoder::checkForHeadCharset looks for charset in the portion of data received and does not feed the parser until it finds the encoding. The limit seems to be set to the end of head section (before body) or 1024 bytes, whatever comes last. However, the logic does not stop if one has HTML with just text in the body, liek this:

<head></head><body>... lots of plain text ... </body>

In this case, the decoder will accumulate all the text, no matter how big, and only then feed it into parser. It may scan it multiple times as well.

Test and patch coming. If for some reason we actually want this to work specifically like this, please voice concern.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list