Calling getaddrinfo() with invalid IPv4 literal

Scott Talbert swt@techie.net
Wed May 13 00:03:20 GMT 2020


Hi,

What is the expected behavior when calling getaddrinfo() with an invalid 
IPv4 literal?  By invalid, I mean a dotted quad where one or more of the 
parts is outside 0-255.

For example, getaddrinfo("1.2.260.5", ...).

Currently, it seems this succeeds, but returns some sort of (rolled over?) 
address.  Previously at some point, it seems this used to return an error.

Thanks,
Scott


More information about the Libc-help mailing list