summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pwd_mkdb
diff options
context:
space:
mode:
authormartin <martin@FreeBSD.org>1996-07-03 21:43:48 +0000
committermartin <martin@FreeBSD.org>1996-07-03 21:43:48 +0000
commitc42838f64b3da632a6b2e97be219ee7089c51612 (patch)
treea85b1d69fb3341ebda66d6b7db9837274be9f811 /usr.sbin/pwd_mkdb
parent91664726c6532bcbe44c6cafbf0ef8b0d10d9384 (diff)
downloadFreeBSD-src-c42838f64b3da632a6b2e97be219ee7089c51612.zip
FreeBSD-src-c42838f64b3da632a6b2e97be219ee7089c51612.tar.gz
Check if username is a NULL pointer before dereferencing it.
Diffstat (limited to 'usr.sbin/pwd_mkdb')
-rw-r--r--usr.sbin/pwd_mkdb/pwd_mkdb.c2
1 files changed, 1 insertions, 1 deletions
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();
/*
OpenPOWER on IntegriCloud