mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
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:
parent
aca49be34f
commit
157f101972
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=22496
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue