[klibc] inet: Stricter IPv6 field parsing in inet_pton()

We currently don't range-check the fields of an IPv6 address, so the
following strings are wrongly accepted:

"10000::"
"::10000"

Since we currently only support hexadecimal fields, implement the
range check by limiting the number of digits to 4.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
1 file changed