From ca7c8034d2df59ea5d67d5ea24b21844db361e48 Mon Sep 17 00:00:00 2001 From: Martin Renters Date: Wed, 3 Jul 1996 21:43:48 +0000 Subject: [PATCH] Check if username is a NULL pointer before dereferencing it. --- usr.sbin/pwd_mkdb/pwd_mkdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/pwd_mkdb/pwd_mkdb.c b/usr.sbin/pwd_mkdb/pwd_mkdb.c index fc2f893cee6a..14df8125ee91 100644 --- a/usr.sbin/pwd_mkdb/pwd_mkdb.c +++ b/usr.sbin/pwd_mkdb/pwd_mkdb.c @@ -125,7 +125,7 @@ main(argc, argv) argc -= optind; argv += optind; - if (argc != 1 || *username == '+' || *username == '-') + if (argc != 1 || (username && (*username == '+' || *username == '-'))) usage(); /*