Skip to content

src: fix IsIPAddress for IPv6

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.

Fixes: https://github.com/nodejs/node/issues/47427

Merge request reports

Loading