RESOLVED DUPLICATE of bug 61572 62917
KURL::protocolIs() triggers an assert when the protocol contains a character that is not an ASCII letter.
https://bugs.webkit.org/show_bug.cgi?id=62917
Summary KURL::protocolIs() triggers an assert when the protocol contains a character ...
Andy Estes
Reported 2011-06-17 17:19:01 PDT
KURL::protocolIs() triggers an assert when the protocol contains a character that is not an ASCII letter.
Attachments
Patch (1.64 KB, patch)
2011-06-17 17:23 PDT, Andy Estes
aestes: review-
Andy Estes
Comment 1 2011-06-17 17:23:05 PDT
Andy Estes
Comment 2 2011-06-17 17:32:30 PDT
*** This bug has been marked as a duplicate of bug 61572 ***
Andy Estes
Comment 3 2011-06-17 17:34:04 PDT
Comment on attachment 97670 [details] Patch I'm going to update this based on comments in https://bugs.webkit.org/show_bug.cgi?id=61572
Darin Adler
Comment 4 2011-06-17 17:35:09 PDT
Comment on attachment 97670 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=97670&action=review > Source/WebCore/platform/KURL.cpp:705 > - if (!protocol[i] || !isLetterMatchIgnoringCase(m_string[i], protocol[i])) > + if (!protocol[i] || toASCIILower(m_string[i]) != protocol[i]) Need to assert that protocol[i] is not an uppercase letter. Also ought to assert that protocol[i] is not a colon character. Maybe assert that it's a legal protocol character. The old function was faster. At the time I wrote it I was super-obsessed with being as optimized as possible. Could still use that old algorithm when the string is all letters.
Note You need to log in before you can comment on or make changes to this bug.