From eb3596b74523f5eb0c1e8b0bb3e2bb26c8ecad55 Mon Sep 17 00:00:00 2001 From: leitner Date: Mon, 15 Apr 2002 16:06:06 +0000 Subject: [PATCH] ugly bug in scan_ip6 that manifests if the IPv6 number starts with a decimal digit and :: skips the 12th byte. --- socket/scan_ip6.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/socket/scan_ip6.c b/socket/scan_ip6.c index 1a7303b..3b64eaf 100644 --- a/socket/scan_ip6.c +++ b/socket/scan_ip6.c @@ -20,12 +20,11 @@ unsigned int scan_ip6(const char *s,char ip[16]) int prefixlen=0; int suffixlen=0; - for (i=0; i<16; i++) ip[i]=0; - if ((i=scan_ip4(s,ip+12))) { for (len=0; len<12; ++len) ip[len]=V4mappedprefix[len]; return i; } + for (i=0; i<16; i++) ip[i]=0; for (;;) { if (*s == ':') { len++;