tor_inet_aton parsing of IPv4 literals is too lax
The function tor_inet_aton accepts strings that include leading zeroes.
For example, "010.010.010.010" is parsed as "10.10.10.10".
This could potentially be a problem because "010.010.010.010" is obsolete notation for an octal IP address.
At least in glibc, inet_aton or getaddrinfo treats "010.010.010.010" as "8.8.8.8", whereas inet_ntop rejects it as invalid.
Trac:
Username: liberat