From c42838f64b3da632a6b2e97be219ee7089c51612 Mon Sep 17 00:00:00 2001 From: martin Date: Wed, 3 Jul 1996 21:43:48 +0000 Subject: 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(-) (limited to 'usr.sbin/pwd_mkdb') diff --git a/usr.sbin/pwd_mkdb/pwd_mkdb.c b/usr.sbin/pwd_mkdb/pwd_mkdb.c index fc2f893..14df812 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(); /* -- cgit v1.1