| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -188,7 +188,7 @@ static bool IsIPAddress(const std::string& host) { | |||
| 188 | 188 | // Parse the IPv6 address to ensure it is syntactically valid. | |
| 189 | 189 | char ipv6_str[INET6_ADDRSTRLEN]; | |
| 190 | 190 | std::copy(host.begin() + 1, host.end() - 1, ipv6_str); | |
| 191 | - ipv6_str[host.length()] = '\0'; | ||
| 191 | + ipv6_str[host.length() - 2] = '\0'; | ||
| 192 | 192 | unsigned char ipv6[sizeof(struct in6_addr)]; | |
| 193 | 193 | if (uv_inet_pton(AF_INET6, ipv6_str, ipv6) != 0) return false; | |
| 194 | 194 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments