X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=compat%2Finet_ntop.c;h=60b5a1d0f8262baca70247923a399fdb4ee3cac1;hb=dc865af65f2f97a738a1761d7e9d389101e29e7b;hp=ea249c6ac6423fd4ef865c1a9d0149ac0ba0cc46;hpb=1f9a980636d39c08c1cf1c13a6e6584d9d039e0e;p=git.git diff --git a/compat/inet_ntop.c b/compat/inet_ntop.c index ea249c6ac..60b5a1d0f 100644 --- a/compat/inet_ntop.c +++ b/compat/inet_ntop.c @@ -98,7 +98,9 @@ inet_ntop6(const u_char *src, char *dst, size_t size) for (i = 0; i < NS_IN6ADDRSZ; i++) words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3)); best.base = -1; + best.len = 0; cur.base = -1; + cur.len = 0; for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) { if (words[i] == 0) { if (cur.base == -1)