Check for, warn about and reject lines with empty keys. You can't have

a database entry with a null key. These are often caused by spurious
blank lines in the map source file.
This commit is contained in:
Bill Paul 1997-02-09 19:34:53 +00:00
parent aca49be34f
commit 157f101972
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=22496

View File

@ -293,6 +293,11 @@ main (argc, argv)
continue;
}
if (!strlen(keybuf)) {
warnx("no key -- check source file for blank lines");
continue;
}
if (strlen(datbuf) > YPMAXRECORD) {
warnx("data too long: %s", datbuf);
continue;