[Webkit-unassigned] [Bug 61572] New: KURL::protocolIs(const char* protocol) asserts in Debug builds with valid protocols

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 26 15:51:43 PDT 2011


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

           Summary: KURL::protocolIs(const char* protocol) asserts in
                    Debug builds with valid protocols
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: ddkilzer at webkit.org
                CC: darin at apple.com


* SUMMARY
KURL::protocolIs(const char* protocol) throws an assertion in Debug builds when a (custom) protocol is compared that contains anything other than letters:

ASSERTION FAILED: isASCIILower(lowercaseLetter)
Source/WebCore/platform/KURL.cpp(63) : bool WebCore::isLetterMatchIgnoringCase(UChar, char)
1   _ZN7WebCoreL25isLetterMatchIgnoringCaseEtc
2   WebCore::KURL::protocolIs(char const*) const

Note that Section 3.1 of RFC 3986 <http://tools.ietf.org/html/rfc3986#section-3.1> states that a scheme must start with a letter, and be composed of letters, digits, "+", "-" and "." characters.  Thus this code that assumes that all characters in the scheme are letters is incorrect:

    // Do the comparison without making a new string object.
    for (int i = 0; i < m_schemeEnd; ++i) {
        if (!protocol[i] || !isLetterMatchIgnoringCase(m_string[i], protocol[i]))
            return false;
    }

-- 
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