16 unsigned int labellen = 0;
18 unsigned int namelen = 0;
29 if (namelen + labellen + 1 >
sizeof(name))
return 0;
30 name[namelen++] = labellen;
40 if ((ch >=
'0') && (ch <=
'7')) {
42 if (n && (*buf >=
'0') && (*buf <=
'7')) {
46 if (n && (*buf >=
'0') && (*buf <=
'7')) {
54 if (labellen >=
sizeof(label))
return 0;
55 label[labellen++] = ch;
59 if (namelen + labellen + 1 >
sizeof(name))
return 0;
60 name[namelen++] = labellen;
66 if (namelen + 1 >
sizeof(name))
return 0;
int dns_domain_fromdot(char **out, const char *buf, unsigned int n)
void * alloc(unsigned int)
void byte_copy(void *, unsigned int, const void *)