提交 7211551e 编写于 作者: R Rich Felker

fix regression in dn_expand/reverse dns

off-by-one error copying the name components was yielding junk at the
beginning and truncating one character at the end (of every
component).
上级 d2c42ed2
......@@ -17,7 +17,7 @@ int __dn_expand(const unsigned char *base, const unsigned char *end, const unsig
} else if (*p) {
j = *p+1;
if (j>=end-p || j>space) return -1;
while (--j) *dest++ = *p++;
while (--j) *dest++ = *++p;
*dest++ = *++p ? '.' : 0;
} else {
if (len < 0) len = p+1-src;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册