https://github.com/ClickHouse/ClickHouse/blob/289a51b61d636e9b2ac98dc912d4d1894cc31e2e/src/Common/formatIPv6.h#L14

According to this [link](https://stackoverflow.com/questions/166132/maximum-length-of-the-textual-representation-of-an-ipv6-address), the Maxiumn length of IPv6 textual representation should be 45.
val = 0;
            continue;
        }
        if (ch == '.' && (tp + IPV4_BINARY_LENGTH) <= endp)
        {
            if (!parseIPv4(curtok, tp))
                return clear_dst();
            std::reverse(tp, tp + IPV4_BINARY_LENGTH);
            tp += IPV4_BINARY_LENGTH;
            saw_xdigit = false;
            break;    
        }
        return clear_dst();
    }
    if (saw_xdigit)
    {
        if (tp + sizeof(UInt16) > endp)
            return clear_dst();
        *tp++ = static_cast<unsigned char>((val >> 8) & 0xffu);
        *tp++ = static_cast<unsigned char>(val & 0xffu);
    }
    if (colonp)
    {
        /*
         * Since some memmove()'s erroneously fail to handle
         * overlapping regions, we'll do the shift by hand.
         */
        const auto n = tp - colonp;
        for (int i = 1; i <= n; ++i)
        {