summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/yp_mkdb/yp_mkdb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.sbin/yp_mkdb/yp_mkdb.c b/usr.sbin/yp_mkdb/yp_mkdb.c
index 8d8eb89..f5164ea 100644
--- a/usr.sbin/yp_mkdb/yp_mkdb.c
+++ b/usr.sbin/yp_mkdb/yp_mkdb.c
@@ -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;
OpenPOWER on IntegriCloud