aboutsummaryrefslogtreecommitdiff
path: root/src/network/inet_pton.c (follow)
Commit message (Expand)AuthorAgeFilesLines
* fix internal buffer overrun in inet_pton•••one stop condition for parsing abbreviated ipv6 addressed was missed, allowing the internal ip[] buffer to overflow. this patch adds the missing stop condition and masks the array index so that, in case there are any remaining stop conditions missing, overflowing the buffer is not possible. Rich Felker2015-03-231-2/+3
* remove an unnecessary check in inet_pton•••at most 4 hexadecimal digits are processed in one field so the value cannot overflow. the netdb.h header was not used. Szabolcs Nagy2013-12-121-2/+1
* fix inet_pton•••* parse IPv4 dotted-decimal correctly (without strtoul, no leading zeros) * disallow single leading ':' in IPv6 address * allow at most 4 hex digits in IPv6 address (according to RFC 2373) * have enough hex fields in IPv4 mapped IPv6 address * disallow leading zeros in IPv4 mapped IPv6 address Szabolcs Nagy2013-10-231-26/+19
* fix return value for inet_pton in ipv6 failure cases•••in the case of input that does not match the expected form, the correct return value is 0, not -1. Rich Felker2013-10-191-6/+6
* use restrict everywhere it's required by c99 and/or posix 2008•••to deal with the fact that the public headers may be used with pre-c99 compilers, __restrict is used in place of restrict, and defined appropriately for any supported compiler. we also avoid the form [restrict] since older versions of gcc rejected it due to a bug in the original c99 standard, and instead use the form *restrict. Rich Felker2012-09-061-1/+1
* fix bug in ipv6 parsing that prevented parsing a lone "::"Rich Felker2011-04-251-4/+1
* ipv6 parsing code (formerly dummied-out)Rich Felker2011-04-251-6/+56
* fix bogus return values for inet_ptonRich Felker2011-04-211-2/+2
* initial check-in, version 0.5.0Rich Felker2011-02-121-0/+31