inet_net_pton_ipv6: avoid signed vs unsigned comparison
authormillert <millert@openbsd.org>
Wed, 13 Apr 2022 16:20:11 +0000 (16:20 +0000)
committermillert <millert@openbsd.org>
Wed, 13 Apr 2022 16:20:11 +0000 (16:20 +0000)
commitba6566ba78ec5d146deb99b3117f6e7332769e20
treef2e3364119571484533cd7fce8613f7444004ced
parent16c2114a7b1d34bdaa24c4eca7bd5e81f75736c0
inet_net_pton_ipv6: avoid signed vs unsigned comparison
Use a temporary variable to store the number of bytes to be copied
(size_t) and also use it as the memcpy(3) length.  Previously we
copied "size" bytes instead of just the necessary number.
OK claudio@ tb@
lib/libc/net/inet_net_pton.c