[webkit-reviews] review denied: [Bug 187859] WebCore::URL::hostIsIPAddress needs a Windows implementation : [Attachment 345627] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 23 19:06:18 PDT 2018


Fujii Hironori <Hironori.Fujii at sony.com> has denied Ross Kirsling
<ross.kirsling at sony.com>'s request for review:
Bug 187859: WebCore::URL::hostIsIPAddress needs a Windows implementation
https://bugs.webkit.org/show_bug.cgi?id=187859

Attachment 345627: Patch

https://bugs.webkit.org/attachment.cgi?id=345627&action=review




--- Comment #2 from Fujii Hironori <Hironori.Fujii at sony.com> ---
Comment on attachment 345627
  --> https://bugs.webkit.org/attachment.cgi?id=345627
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=345627&action=review

> Source/WebCore/platform/URL.cpp:1082
> +	       if (digit > '9' || digit < (i ? '1' : '0'))

This loop scans backward. If i == 0, it is the last number. You want to check
the first number here. It should be "(i == length - 1 ? '1' : '0')"

> Source/WebCore/platform/URL.cpp:1085
> +	       value += 10 * (digit - '0');

This is not correct. For example, a number '123' is given.
value = 0;
value += 10 * 3;
value += 10 * 2;
value += 10 * 1;
Then value becomes 60, not 123.


More information about the webkit-reviews mailing list