src: fix IsIPAddress for IPv6
requested to merge github/fork/JaneaSystems/huseyin-12295-fix-flaky-cctest-test-inspector-socket into main
I've investigated and found a fix to the related issue as follows:
host
keeps the host address which is [::]
in our case. Then, it is copied to a char array (ipv6_str
) to remove brackets. However, when adding a null-terminator, the index is written wrong. The length should have been decreased by 2 to add a null terminator.