You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Call goes to method DomainNameToIP_Berkley_IPV4And6. In this method getaddrinfo called. On my machine first goes addrinfo from getaddrinfo with AF_INET6 family, so we goes to line 66:
And bug is here: we pass output parameter ip with size of 1 instead of sizeof(ip) to getnameinfo, so the correct code will be: getnameinfo((struct sockaddr *)ipv6, sizeof(struct sockaddr_in6), ip, sizeof(ip), NULL, 0, NI_NUMERICHOST);
Thanks for the clear report and description of the issue and sorry for the delay. Obviously you are correct and we applied the suggested solution to the current trunk/master version already (internal case number: SLNET-260).
Changes are scheduled to be shipped in SLikeNet 0.2.0.
While building RakNet 4.081 i found a bug and looks like it still presents in SLikeNet.
Bug can be reproduced if call this code:
with flag
RAKNET_SUPPORT_IPV6
set to 1.Call goes to method
DomainNameToIP_Berkley_IPV4And6
. In this methodgetaddrinfo
called. On my machine first goesaddrinfo
fromgetaddrinfo
withAF_INET6
family, so we goes to line 66:And bug is here: we pass output parameter
ip
with size of 1 instead ofsizeof(ip)
togetnameinfo
, so the correct code will be:getnameinfo((struct sockaddr *)ipv6, sizeof(struct sockaddr_in6), ip, sizeof(ip), NULL, 0, NI_NUMERICHOST);
getnameinfo
on MSDN - https://docs.microsoft.com/en-us/windows/desktop/api/ws2tcpip/nf-ws2tcpip-getnameinfoThe text was updated successfully, but these errors were encountered: