fix __ipparse to parse the generic numbers-and-dots IPv4 format correctly
authorSzabolcs Nagy <nsz@port70.net>
Tue, 22 Oct 2013 12:28:17 +0000 (12:28 +0000)
committerSzabolcs Nagy <nsz@port70.net>
Tue, 22 Oct 2013 12:28:17 +0000 (12:28 +0000)
commit51c4e451db10317616e557a7aa7922bababa77d5
tree4af96779ba2fe11555849fd60a336141e7c96e35
parent59b8dc08f712f156dd54e0aba50e4e647524ec8c
fix __ipparse to parse the generic numbers-and-dots IPv4 format correctly

* allow at most 4 parts
* bounds check the parts correctly
* disallow leading whitespace and sign
* check the address family before falling back to IPv6
src/network/__ipparse.c