| Summary: | WebCore::URL::hostIsIPAddress needs a Windows implementation | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Ross Kirsling <ross.kirsling> | ||||||
| Component: | WebCore Misc. | Assignee: | Ross Kirsling <ross.kirsling> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | achristensen, bfulgham, commit-queue, Hironori.Fujii, pvollan, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Bug Depends on: | 187864 | ||||||||
| Bug Blocks: | |||||||||
| Attachments: |
|
||||||||
|
Description
Ross Kirsling
2018-07-20 09:22:55 PDT
Created attachment 345627 [details]
Patch
Comment on attachment 345627 [details] 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. Created attachment 345637 [details]
Patch
Sorry, those really were some stupid mistakes on my part. It seems that ultimately forward iteration is the most straightforward here. I've also added a few extra test cases for IPv4 accordingly. Comment on attachment 345637 [details] Patch Clearing flags on attachment: 345637 Committed r234147: <https://trac.webkit.org/changeset/234147> All reviewed patches have been landed. Closing bug. |