/* Sanity check name: must contain only letters, numerals, and
* hyphen, and not start or end with a hyphen. Also make sure no
- * label (the thing the .s seperate) is longer than 63 characters.
+ * label (the thing the .s seperate) is longer than 63 characters,
+ * or empty.
*/
for (p = name, count = 0; *p; p++)
(*p == '-' && p[1] == '.'))
return 0;
if (*p == '.')
- count = 0;
+ {
+ if (count == 1)
+ return 0;
+ count = 0;
+ }
if (count == 64)
return 0;
}