- Note that the parsing code has a bug that treats names like
www...foo....com the same as www.foo.com. No fix at this time.
/*
- * $Id: rfc1035.c,v 1.17 2000/07/14 17:45:54 wessels Exp $
+ * $Id: rfc1035.c,v 1.18 2000/09/14 15:41:03 wessels Exp $
*
* Low level DNS protocol routines
* AUTHOR: Duane Wessels
off_t off = 0;
char *copy = strdup(name);
char *t;
+ /*
+ * NOTE: use of strtok here makes names like foo....com valid.
+ */
for (t = strtok(copy, "."); t; t = strtok(NULL, "."))
off += rfc1035LabelPack(buf + off, sz - off, t);
free(copy);