*dn++ = '\0';
return (dn - dst);
}
+libresolv_hidden_def (ns_name_ntop)
/*
* ns_name_pton(src, dst, dstsiz)
it internally. */
*label = 0x41;
label = bp++;
- /* Another simplification: always assume
- 128 bit number. */
- if (bp + 16 >= eom) {
- __set_errno (EMSGSIZE);
- return (-1);
- }
++src;
while (isxdigit (*src)) {
n = *src > '9' ? *src - 'a' + 10 : *src - '0';
}
n <<= 4;
n += *src > '9' ? *src - 'a' + 10 : *src - '0';
+ if (bp + 1 >= eom) {
+ __set_errno (EMSGSIZE);
+ return (-1);
+ }
*bp++ = n;
++src;
}
len = srcp - src;
return (len);
}
+libresolv_hidden_def (ns_name_unpack)
/*
* ns_name_pack(src, dst, dstsiz, dnptrs, lastdnptr)