WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
167773
URLParser: Fix parsing invalid IPv4 addresses with non-ASCII characters
https://bugs.webkit.org/show_bug.cgi?id=167773
Summary
URLParser: Fix parsing invalid IPv4 addresses with non-ASCII characters
Alex Christensen
Reported
2017-02-02 19:08:28 PST
URLParser: Fix parsing invalid IPv4 addresses with non-ASCII characters
Attachments
Patch
(7.20 KB, patch)
2017-02-02 19:16 PST
,
Alex Christensen
rniwa
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2017-02-02 19:16:40 PST
Created
attachment 300484
[details]
Patch
Ryosuke Niwa
Comment 2
2017-02-02 22:20:25 PST
Comment on
attachment 300484
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=300484&action=review
> Source/WebCore/platform/URLParser.cpp:2580 > + const auto hostBegin = iterator; > +
Why does moving this declaration make sense?
> Source/WebCore/platform/URLParser.cpp:2637 > - if (auto address = parseIPv4Host(CodePointIterator<CharacterType>(hostIterator, iterator))) { > + if (auto address = parseIPv4Host(hostBegin, CodePointIterator<CharacterType>(hostIterator, iterator))) {
This whole if (LIKELY(!m_hostHasPercentOrNonASCII)) will exit.
> Source/WebCore/platform/URLParser.cpp:-2663 > - > - auto hostBegin = iterator; > -
Before we ever execute code beneath this. I think it's cleaner to create a local variable inside LIKELY(!m_hostHasPercentOrNonASCII) instead.
Alex Christensen
Comment 3
2017-02-02 22:32:07 PST
http://trac.webkit.org/r211621
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug